← Back to index
|
Original Bugzilla link
Bug 16612 – Bug in std.regex? in dmd? Segmentation fault
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-10-14T05:37:00Z
Last change time
2017-03-08T16:56:40Z
Assigned to
nobody
Creator
dpyurchenko
Comments
Comment #0
by dpyurchenko — 2016-10-14T05:37:34Z
# cat issue.d import std.regex; import std.stdio; void main() { auto r = regex(r"[0-9]"); foreach(line; stdin.byLine) { try { auto m = matchAll(line, r); } catch(Exception e) continue; } } # dmd --version DMD64 D Compiler v2.071.2 Copyright (c) 1999-2015 by Digital Mars written by Walter Bright # dmd issue.d # file issue issue: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=aca6ea48b10e8b41a49510e3a2348811347f7246, not stripped # ldd issue linux-vdso.so.1 (0x00007ffe8e9e5000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1f02b89000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1f02888000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1f02680000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1f0247c000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1f02266000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1f01ebb000) /lib64/ld-linux-x86-64.so.2 (0x00007f1f02da6000) # time ./issue < /dev/urandom Segmentation fault real 0m4.389s user 0m1.716s sys 0m2.664s # ldc2 --version LDC - the LLVM D compiler (1.1.0-beta3): based on DMD v2.071.2 and LLVM 3.9.0 built with LDC - the LLVM D compiler (1.1.0-beta3) Default target: x86_64-unknown-linux-gnu Host CPU: penryn
http://dlang.org
-
http://wiki.dlang.org/LDC
Registered Targets: x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 # ldc2 issue.d # file issue issue: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=f7bba9ffa9fe9ed20514248f9b86bbb3b46115f4, not stripped # ldd issue linux-vdso.so.1 (0x00007ffd867e6000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f798f2c6000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f798f0c2000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f798eea5000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f798eba4000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f798e98e000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f798e5e3000) /lib64/ld-linux-x86-64.so.2 (0x00007f798f4ce000) # time ./issue < /dev/urandom ^C real 6m28.451s user 2m3.708s sys 4m24.472s # uname -a Linux host 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux
Comment #1
by dmitry.olsh — 2017-03-08T16:56:40Z
Cannot reproduce on DMD v2.074alpha. Try with latest stable could have been a compiler issue.