lewisje / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
0 stars 0 forks source link

Problems with C11's aligned_alloc? #337

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by n...@astrant.net on 5 Sep 2014 at 2:29

GoogleCodeExporter commented 9 years ago
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. 

Original comment by konstant...@gmail.com on 5 Sep 2014 at 7:31

GoogleCodeExporter commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Original comment by ramosian.glider@gmail.com on 30 Jul 2015 at 9:14