Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[drmem] ASSERT FAILURE: common/alloc.c:1480: pt->expect_lib_to_fail (free() failure unexpected) #264

Closed
derekbruening opened this issue Nov 27, 2014 · 6 comments

Comments

@derekbruening
Copy link
Contributor

From [email protected] on February 24, 2010 10:53:35

(Using 1.0.8-1 from portable .zip package)
OS: Windows XP 32-bit

ASSERT FAILURE:
E:/derek/dr/tot/internal/clients/common/alloc.c:1480:
pt->expect_lib_to_fail (free() failure unexpected)

Happened on Chromium's base_unittest.exe

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=264

@derekbruening
Copy link
Contributor Author

From [email protected] on March 07, 2010 12:43:06

Did you run with any particular arguments?
When I run I don't get any asserts (with version 1.0.9-1 on 32-bit XP).

Can you use these options to drmemory.exe:

-dr_ops "-dumpcore_mask 0x8bff"

and reproduce and attach the resulting
base_unittests.exe..00000000.ldmp file from the
/dynamorio/logs/ directory? The ldmp should compress nicely
to save space prior to attaching. Also, if the run is pretty short can you
run with "-verbose 2" and attach the resulting global..log file from
the same directory as the results.txt file (compress it too if large)?

Summary: [drmem] ASSERT FAILURE: common/alloc.c:1480: pt->expect_lib_to_fail (free() failure unexpected)
Status: NeedInfo
Labels: OpSys-Windows Component-Dr.Memory

@derekbruening
Copy link
Contributor Author

From [email protected] on March 09, 2010 07:23:23

I haven't seen this assertion with 1.0.9-1 anymore.
You can probably close the issue.
I'll notify you if I see the assert again.

@derekbruening
Copy link
Contributor Author

From [email protected] on March 09, 2010 08:03:26

Status: CannotReproduce

@derekbruening
Copy link
Contributor Author

From [email protected] on March 09, 2010 08:34:12

Sorry, the assertion still happens, see comment #4 in Issue 263

@derekbruening
Copy link
Contributor Author

From [email protected] on March 14, 2010 19:15:42

I was able to reproduce this using the params in issue #263 the bug is that delayed free entries are not invalidated when a private heap is
destroyed, resulting in frees that fail. "-delay_frees 0" is a workaround until I
put out a new release with the bug fixed.

Status: Started

@derekbruening
Copy link
Contributor Author

From [email protected] on March 19, 2010 09:15:58

fixed in 1.0.10
can you verify and then change status to Verified (same w/ all the other Issues I'm
marking as Fixed here)

Status: Fixed

derekbruening added a commit that referenced this issue Jul 5, 2023
8 of the 13 tests on Mac AArch64 labeled "OSX" fail prior to this PR.
Here we fix the following:

+ Syscall success is indicated by the carry flag just like x86 Mac
+ Handle sigreturn with its extra parameters just like x86 Mac
+ Fix signal handler parameters
+ Fix stolen register support in signal contexts
+ Use MAP_JIT and pthread_jit_write_protect_np for +rwx gencode in tests
+ Use DYLD_LIBRARY_PATH on Mac in tests

Now all 13 tests pass:
---------------------------------------------------------------------------------------
ctest -j 5 -L OSX
 1/13 Test  #13: code_api|common.fib ................................  Passed  0.59 sec
 2/13 Test #243: code_api|libutil.frontend_test .....................  Passed  0.63 sec
 3/13 Test #231: code_api|api.ir ....................................  Passed  0.67 sec
 4/13 Test   #9: code_api|linux.sigaction.native ....................  Passed  0.25 sec
 5/13 Test  #31: code_api|linux.signal0000 ..........................  Passed  0.10 sec
 6/13 Test #240: code_api|api.ir-static .............................  Passed  0.34 sec
 7/13 Test #241: code_api|api.drdecode ..............................  Passed  0.38 sec
 8/13 Test #245: code_api|api.dis-a64 ...............................  Passed  1.15 sec
 9/13 Test #264: no_code_api,no_intercept_all_signals|linux.sigaction  Passed  0.08 sec
10/13 Test  #33: code_api|linux.signal0010 ..........................  Passed  0.34 sec
11/13 Test  #35: code_api|linux.signal0100 ..........................  Passed  0.42 sec
12/13 Test  #37: code_api|linux.signal0110 ..........................  Passed  0.45 sec
13/13 Test   #7: samples_proj .......................................  Passed  1.89 sec
100% tests passed, 0 tests failed out of 13
---------------------------------------------------------------------------------------

Issue: #5383
github-merge-queue bot pushed a commit that referenced this issue Jul 7, 2023
8 of the 13 tests on Mac AArch64 labeled "OSX" fail prior to this PR.
Here we fix the following:

+ Syscall success is indicated by the carry flag just like x86 Mac
+ Handle sigreturn with its extra parameters just like x86 Mac
+ Fix signal handler parameters
+ Fix stolen register support in signal contexts
+ Use MAP_JIT and pthread_jit_write_protect_np for +rwx gencode in tests
+ Use DYLD_LIBRARY_PATH on Mac in tests

Now all 13 tests pass:
```
---------------------------------------------------------------------------------------
$ ctest -j 5 -L OSX
 1/13 Test  #13: code_api|common.fib ................................  Passed  0.59 sec
 2/13 Test #243: code_api|libutil.frontend_test .....................  Passed  0.63 sec
 3/13 Test #231: code_api|api.ir ....................................  Passed  0.67 sec
 4/13 Test   #9: code_api|linux.sigaction.native ....................  Passed  0.25 sec
 5/13 Test  #31: code_api|linux.signal0000 ..........................  Passed  0.10 sec
 6/13 Test #240: code_api|api.ir-static .............................  Passed  0.34 sec
 7/13 Test #241: code_api|api.drdecode ..............................  Passed  0.38 sec
 8/13 Test #245: code_api|api.dis-a64 ...............................  Passed  1.15 sec
 9/13 Test #264: no_code_api,no_intercept_all_signals|linux.sigaction  Passed  0.08 sec
10/13 Test  #33: code_api|linux.signal0010 ..........................  Passed  0.34 sec
11/13 Test  #35: code_api|linux.signal0100 ..........................  Passed  0.42 sec
12/13 Test  #37: code_api|linux.signal0110 ..........................  Passed  0.45 sec
13/13 Test   #7: samples_proj .......................................  Passed  1.89 sec
100% tests passed, 0 tests failed out of 13
---------------------------------------------------------------------------------------
```
Issue: #5383
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant