On Mon, Mar 26, 2018 at 5:37 PM, Nicolas Schmidt <schmidtn@math.hu-berlin.de
> wrote:
>
> a while ago I posted on this list because of a problem I experienced with
> building OpenBSD 6.2-current from source (the base system, not the kernel).
https://www.openbsd.org/faq/faq5.html#Flavors
I'm not sure what you mean by "6.2-current": exactly what tag did you check
out and when? From the line numbers, you are either actually building
6.2-stable, checked out from the OPENBSD_6_2 tag, or are building something
checked out from the trunk back in the fall.
> Today I found the culprit, and it's rather strange: returning from main(),
> or calling exit() explicitly causes a segmentation fault.
>
> A minimal example is:
>
> int main(int argc, char **argv) { return 0; }
>
> Evaluating cc -o test test.c; ./test should result in a segmentation
> fault. Here's the backtrace gdb gives me:
>
> #0 _libc___cxa_finalize () at /usr/src/lib/libc/stdlib/atexit.c:133
> #1 0x0de4d9fb in _libc_exit (status=0) at /usr/src/lib/libc/stdlib/exit.
> c:54
> #2 0x18bef421 in main () from /home/nico/test
>
> Anyone able to reproduce this?
>
Nope. I don't know what you did on your system since it was stable, but
you've somehow built and installed
a) a broken libc,
b) a broken csu (crt0, crtbegin, etc), OR
c) a broken compiler
If you have a good memory or record of what builds and changes you made,
then you could go through that and figure out exactly how/why the broken
bits were built and installed. Frankly, I don't think you have notes good
enough to figure that out (*I* rarely keep that good of track of my changes
and builds, so that's not an insult), so the recommended strategy is to
reinstall with known good setup, verify that it's actually good before
making any changes, and then keep better notes *next* time so you can
figure out how you broke it.
Philip Guenther
No comments:
Post a Comment