[Issue 17596] dmd d 2.073.2 and 2.074.1 interim generated dmd segfaults on FreeBSD 12-CURRENT

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jul 8 22:28:31 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17596

--- Comment #5 from Cy Schubert <cy at FreeBSD.org> ---
Thanks. I'll develop a patch (will take some time -- I have a number of
projects on the fly at the moment). The patch will will work for FreeBSD 12
after r318736 but break all FreeBSD releases prior to that. This is not
optimal. Is there a version() statement that will allow me to test for FreeBSD
version or can DMD read /usr/include/sys/param.h for the C pre-processor define
of __FreeBSD_version?

Also, it appears that ldc (DMD D with an llvm backend, see
http://wiki.dlang.org/LDC) has the same segfault under FreeBSD 12. I don't
maintain it for the FreeBSD project but it too suffers the same segfault. Maybe
a more holistic approach needs to be taken than a simple point patch.
Eventually when FreeBSD 12 is released to the public there will be two
different stat_t and dirent_t data structures (pre- and post-inode64). What do
you think if DMD D and LDC D provided a facility to test __FreeBSD_version or
if not that the major.minor version number? No matter what we do we will break
old or new systems.

If you can provide a version() statement that can test for either
__FreeBSD_version in /usr/include/sys/param.h (preferred) or the FreeBSD
major.minor version number, any patch I produce will work for both. (I kind of
think this might be useful for most other O/S's too, e.g. RHEL 6 v.s. RHEL 7,
though the test would be very different for each.)

--


More information about the Digitalmars-d-bugs mailing list