[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
Wed Jul 5 20:33:40 PDT 2017


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

--- Comment #3 from Cy Schubert <cy at FreeBSD.org> ---
Correct.

The implementer of inode64 has done a great job of avoiding ABI breakage.
Applications built before inode64 continue to run due to code in libc to detect
"old" v.s. "new". Most newly compiled code builds and runs okay. DMD is
different however because many data structures are replicated in DMD. For
example stat_t and dirent_t headers have issues.

I wasn't able to find a stub that DMD D might use to make the actual call. If
you can point me in the right direction I should be able to do the work myself
(when I can find the time).

Having said that, any change would be incompatible with older releases of
FreeBSD so, a possible solution might be a version check for
version(FreeBSD12+) -- (FreeBSD uses a version check in
/usr/include/sys/param.h.) Is there a way to determine which release of FreeBSD
within DMD D? Such as version(something)?

So summarize my thoughts above:

1. The data structures and files that use inodes system calls to stat(), fstat,
and others need to be identified. I can do some of the work or we can work
together.

2. Some way of identifying "old" FreeBSD v.s. "new" FreeBSD through a version
check.

Hopefully this is not too much information (as I tend to get into the weeds).

~cy

--


More information about the Digitalmars-d-bugs mailing list