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

Problems with C11's aligned_alloc? #337

Closed
ramosian-glider opened this issue Sep 1, 2015 · 2 comments
Closed

Problems with C11's aligned_alloc? #337

ramosian-glider opened this issue Sep 1, 2015 · 2 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 337

What steps will reproduce the problem?
nick@fusrodah:/tmp$ cat openal-asan-trigger.cpp
#include <AL/al.h>
#include <AL/alc.h>

int main(){
ALCdevice* d = alcOpenDevice(0);
alcCloseDevice(d);
}
nick@fusrodah:/tmp$ clang++ -fsanitize=address openal-asan-trigger.cpp -lopenal
nick@fusrodah:/tmp$ ./a.out
=================================================================
==7999==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed:
0x0000034cc010 in thread T0
#0 0x465499 in __interceptor_free (/tmp/a.out+0x465499)
#1 0x7f905849e3b1 (/usr/lib/libopenal.so.1+0x2a3b1)
#2 0x47b8d2 in main (/tmp/a.out+0x47b8d2)
#3 0x7f9057292fff in __libc_start_main (/usr/lib/libc.so.6+0x1ffff)
#4 0x47b6fc in _start (/tmp/a.out+0x47b6fc)

AddressSanitizer can not describe address in more detail (wild memory access suspected).
SUMMARY: AddressSanitizer: bad-free ??:0 __interceptor_free
==7999==ABORTING

What is the expected output? What do you see instead?
No error from ASAN, the thing is properly allocated.

What version of the product are you using? On what operating system?
Asan from clang-3.4 on Arch linux.

Please provide any additional information below.
Arch Linux bug report: https://bugs.archlinux.org/task/41651?
OpenAL bug report (with the conclusion that it doesn't error when malloc is used instead
of alligned_alloc): https://github.com/kcat/openal-soft/issues/1




Reported by nick@astrant.net on 2014-09-05 14:29:29

@ramosian-glider
Copy link
Member Author

This should have been fixed by
http://llvm.org/viewvc/llvm-project?view=revision&revision=212322
Please try the fresh trunk and reopen the bug if it exists there. 

Reported by konstantin.s.serebryany on 2014-09-05 19:31:51

  • Status changed: Fixed

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:14:08

  • Labels added: ProjectAddressSanitizer

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