[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] Re: [patch] Fix for race in dwarf_find_save_locs

From: Paul Pluzhnikov
Subject: [Libunwind-devel] Re: [patch] Fix for race in dwarf_find_save_locs
Date: Tue, 24 Nov 2009 13:31:36 -0800

On Tue, Nov 24, 2009 at 12:12 PM, Arun Sharma <address@hidden> wrote:

> You're right. This part is broken for dwarf. We'll need to fix it along the
> lines of src/ia64/Gscript.c

Tricky (unless we drastically reduce cache size): current
sizeof(local_addr_space) on x86_64 is 43664, and adding this much
TLS to each thread may run into glibc issue: glibc does not
automatically add required TLS space at pthread_create, so if you
specify e.g. 64K stack, pthread_create will fail with EINVAL just
because you linked to libunwind.

> Agree that fix#1 is suboptimal. The choice is really between fix #2 and a

Hmm, I don't think that's the choice: libunwind *should* work with either!

Attached is a fix#2A, which removes the race for UNW_CACHE_GLOBAL,
but doesn't penalize UNW_CACHE_PER_THREAD (except for a single branch).

Paul Pluzhnikov

Attachment: libunwind-fix-race-20091124.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]