#301714 aborts when /proc/self/stat is restricted

#301714#5
Date:
2005-03-27 21:06:31 UTC
From:
To:
When /proc/self/stat does not contain information about the stack,
like ie. on a grsecurity enabled kernel, any program linked to libgc1
abort()'s with the error message "Absurd stack bottom value".
This is due to result (the stack base value as read from
/proc/self/stat) being 0 at the test in line 975 of os_dep.c.

As a workaround I tried using the heuristic methods to find the stack
base instead of the linux one.
Using HEURISTIC1 causes a segfault, HEURISTIC2 *seems* to work (I
visited a webpage with w3m, which is linked against libgc1 and showed
the descrided behaviour before).

I attached the patch just to illustrate what I changed and did not add
the patch tag as it is just a workaround.