diff options
author | fche <fche@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-10 18:42:28 +0000 |
---|---|---|
committer | fche <fche@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-10 18:42:28 +0000 |
commit | 721cae82d644adb901d4f29b6de5e4fc034ca45f (patch) | |
tree | f1e9d593de06af753a78e3763ac0ae92abff57ec /libmudflap/testsuite | |
parent | a60f2dd76587f4122e5c58df77fb7769e05e23c7 (diff) | |
download | ppe42-gcc-721cae82d644adb901d4f29b6de5e4fc034ca45f.tar.gz ppe42-gcc-721cae82d644adb901d4f29b6de5e4fc034ca45f.zip |
2006-11-10 Frank Ch. Eigler <fche@redhat.com>
PR libmudflap/28578
* mf-hooks1.c (__mf_0fn_malloc): Make the bootstrap buffers
static but not function scope static.
(free): Skip deallocation attempts for objects placed into
bootstrap buffers.
* testsuite/libmudflap.cth/pass59-frag.c: New test.
M libmudflap/mf-hooks1.c
M libmudflap/ChangeLog
A libmudflap/testsuite/libmudflap.cth/pass59-frag.c
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118662 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap/testsuite')
-rw-r--r-- | libmudflap/testsuite/libmudflap.cth/pass59-frag.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libmudflap/testsuite/libmudflap.cth/pass59-frag.c b/libmudflap/testsuite/libmudflap.cth/pass59-frag.c new file mode 100644 index 00000000000..bf6c293136d --- /dev/null +++ b/libmudflap/testsuite/libmudflap.cth/pass59-frag.c @@ -0,0 +1,39 @@ +#include <stdio.h> +#include <pthread.h> + +/* PR 28578 */ + +void* test_thread(void* arg) +{ + printf("Hello from thread!\n"); + pthread_exit(NULL); + return 0; +} + +int main() +{ + pthread_t thread; + int arg = 0; + pthread_create(&thread, NULL, test_thread, (void*)arg); + pthread_join(thread, NULL); + pthread_exit(NULL); + return 0; +} + +/* { dg-output "Hello from thread!\n" } */ + +#if 0 + +/* Even this test case replicates the problem. However, when built in + static mode, it blows up during __mf_init (?!?!?!) with a + pthread_mutex_lock deadlock error. */ + +#include <stdio.h> +#include <pthread.h> + +int main () +{ + pthread_exit(NULL); + return 0; +} +#endif |