[Issue 21656] [REG2.091] Wrong file read during exception stringification leads to SIGBUS
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 23 02:30:56 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21656
--- Comment #7 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
(In reply to Jacob Carlborg from comment #6)
> A file descriptor to the executable also seems to be available in the
> auxiliary vector on Linux [1]. This can be accessed with the function
> `getauxval` or directly after the `envp` parameter in the C main function. I
> see references to the auxiliary vector in *BSD systems as well. Might be
> worth checking out.
Interesting, though as far as I can see, that file descriptor is only available
to interpreters, and is no longer there at the time that the interpreted
program has begun execution. Otherwise, it would take up a file descriptor
slot, and thus would be a very noticeable fourth addition to the standard
stdin/stdout/stderr streams. So it doesn't look like we can use this
unfortunately.
--
More information about the Digitalmars-d-bugs
mailing list