Skip to content

Conversation

@tiran
Copy link
Contributor

@tiran tiran commented Feb 10, 2022

$ CC=clang CXX=clang++ cmake ../../ -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_UBSAN=on
$ make
$ ./mimalloc-test-api
test: malloc-zero...  ok.
test: malloc-nomem1...  mimalloc: error: allocation request is too large (9223372036854775808 bytes)
mimalloc: error: allocation request is too large (9223372036854775808 bytes)
mimalloc: error: unable to allocate memory (9223372036854775808 bytes)
ok.
test: malloc-null...  ok.
test: malloc-large...  .../src/segment.c:750:23: runtime error: index 1089 out of bounds for type 'mi_slice_t [1024]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior .../src/segment.c:750:23 in

See: #543
Signed-off-by: Christian Heimes christian@python.org

```
$ CC=clang CXX=clang++ cmake ../../ -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_UBSAN=on
$ make
$ ./mimalloc-test-api
test: malloc-zero...  ok.
test: malloc-nomem1...  mimalloc: error: allocation request is too large (9223372036854775808 bytes)
mimalloc: error: allocation request is too large (9223372036854775808 bytes)
mimalloc: error: unable to allocate memory (9223372036854775808 bytes)
ok.
test: malloc-null...  ok.
test: malloc-large...  .../src/segment.c:750:23: runtime error: index 1089 out of bounds for type 'mi_slice_t [1024]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior .../src/segment.c:750:23 in
```

See: microsoft#543
Signed-off-by: Christian Heimes <christian@python.org>
@daanx daanx changed the base branch from dev-slice to dev February 10, 2022 19:06
@daanx daanx changed the base branch from dev to dev-slice February 10, 2022 19:06
daanx added a commit that referenced this pull request Feb 10, 2022
@tiran tiran closed this Feb 10, 2022
@daanx
Copy link
Collaborator

daanx commented Feb 10, 2022

Thanks for the PR @tiran; I did add this test by hand to base it on the dev branch but I linked to you and this PR in the commit. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants