Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: libpthread breaking various pkg builds
On Dec 26, 11:59pm, aniou%smutek.pl@localhost (Piotr Meyer) wrote:
-- Subject: Re: libpthread breaking various pkg builds
| On Sun, Dec 26, 2010 at 11:53:24AM -0500, Christos Zoulas wrote:
|
| > I know. Any help debugging it is appreciated, but I think that
| > in the end TLS will come to the rescue.
|
| I think, in this case we hit protected pages due to change from
| rev. 1.119 of src/lib/libpthread/pthread.c (mprotect base only
| if we move it). Program faults in pthread__stackid_setup on write:
|
| t->pt_stack.ss_size = size - 2 * pagesize;
|
| Data from two faults (: marks my own debug from pthread__initmain
| and pthread__stackid_setup):
|
| stack 0xbfc00000 d=0x5ff000 0xbf601000
| applying to 0xbbbf8000
| : pthread__sp: bf5ff494
| :: redaddr: 0xbf401000 base: 0xbf400000
| [segfault]
|
| stack 0xbfc00000 d=0xdfe000 0xbee02000
| applying to 0xbbbf8000 orig_addr=0x0 f=1002
| result 0xb78b1000
| applying to 0xbbbf
| : pthread__sp: bedffc80
| :: redaddr: 0xbec01000 base: 0xbec00000
| [segfault]
|
|
| ...but with unconditionally mprotect we hit already mentioned
| problem, when pthread_self() returns different bases for same
| thread when stack pointer crosses boundaries, for example:
|
| * sp: 0xbf800060 va: 0xbf800000
| * sp: 0xbf8001b0 va: 0xbf800000
| * sp: 0xbf7ff3b0 va: 0xbf600000
| * sp: 0xbf7ff394 va: 0xbf600000
| [hang]
Right, so what to do here? How do we detect if we need the mprotect call?
christos
Home |
Main Index |
Thread Index |
Old Index