-
Notifications
You must be signed in to change notification settings - Fork 76
critical: memory corruption when using threads and nedrealloc #9
Comments
[source] // g++ nedmalloctester2.c -o nedmalloctester2 -O3 -s -pthread #define USE_LOCKS 1 /* // crash: #define malloc_vpool nedmalloc #define TESTMEMMAX 1024_1024_2 void ** test=NULL; int div_w=8; // random block size to be sure that we touching pointers allocated from different thread ID-s void malt(int thread){ void *malt2(void * threadid){malt(1);} void MallocStabTest2(){
} int main(){ [/source] |
overwritting the nedmalloc.c.h with the older version seems to fix the problem too |
You're absolutely right - that merge of latest dlmalloc ought to live in its own branch away from master until I get a chance to integrate it properly. I'll fix it up. |
Ok, reverted to dlmalloc v2.8.4. |
bug type:
memory (chunk?) corruption, when using nedrealloc from multiple threads
reproducing:
-need many threads with simultanously touching nedmalloc
-needs the current newest nedmalloc files (no crash with previous version)
-tested with linux (64 bit)
if you replace nedmalloc to older version, OR if you disable threading, OR if you remove the nedrealloc, crash disappears
testsystem:
uname -r -a
Linux a1 3.1.0-1.2-desktop #1 SMP PREEMPT Thu Nov 3 14:45:45 UTC 2011 (187dde0) x86_64 x86_64 x86_64 GNU/Linux
g++ --version
g++ (SUSE Linux) 4.6.2
(64 bit binary used in test)
bug rating:
critical
bug results:
nedmalloc aborts on various locations, or stucks in infinite loop
output:
attempt 1:
0 percent finished
1 percent finished
(hangs in infinite loop)
attempt 2:
0 percent finished
....
...
...
66 percent finished
(hangs in infinite loop)
attempt 3:
0 percent finished
....
...
...
26 percent finished
nedmalloc: nedprealloc() called with a block not created by nedmalloc!
Aborted
testcase:
The text was updated successfully, but these errors were encountered: