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

--list=cuda-devices: with ASan #1238

Closed
loverszhaokai opened this issue Apr 28, 2015 · 6 comments
Closed

--list=cuda-devices: with ASan #1238

loverszhaokai opened this issue Apr 28, 2015 · 6 comments
Assignees

Comments

@loverszhaokai
Copy link
Contributor

#1. Prepare

$ export ASAN_OPTIONS='abort_on_error=1'
$ CC=clang AFL_USE_ASAN=1 AFL_HARDEN=1 ./configure --enable-asan --enable-memdbg && make -sj8
#2. Reproduce

$ ./john --list=cuda-devices

...
After a long time about one hour
...
CUDA Device #4328731
Name:
Type: integrated
Compute capability: 20.0 (sm_200)
Number of multiprocessors: 32767
Clock rate: 0 Mhz
Memory clock rate (peak) 12506 Mhz
Memory bus width 0 bits
Peak memory bandwidth: 0 GB/s
Total global memory: 16.0 MB
Total shared memory per block: 20.0 B
Total constant memory: 12.0 B
L2 cache size 15.0 EB
Kernel execution timeout: Yes
Concurrent copy and execution: No
Concurrent kernels support: No
Warp size: 32767
Max. GPRs/thread block 1587689520
Max. threads per block 1172321806
Max. resident threads per MP 32673
PCI device topology: feea0ff0:7fa1.1
NVML id: -1
Fan speed: n/a
GPU temp: n/a
Utilization: n/a

==6563==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 12048 byte(s) in 2 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857d34e ()

Direct leak of 136 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f86566fa ()

Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857a8b2 ()
#2 0x60c00000bf7f ()

Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857a814 ()

Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857acb1 ()

Indirect leak of 720 byte(s) in 10 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857977c ()

Indirect leak of 512 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857d288 ()
#2 0x43314c4374 ()

Indirect leak of 240 byte(s) in 10 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f857978d ()

Indirect leak of 168 byte(s) in 22 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1fcf771d1 in __GI___strndup (/lib64/libc.so.6+0x811d1)

Indirect leak of 141 byte(s) in 5 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1fcf77171 in __GI___strdup (/lib64/libc.so.6+0x81171)

Indirect leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x4b54f0 in __interceptor_malloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40
#1 0x7fa1f8579810 ()

Indirect leak of 56 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f85797e7 ()

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857d880 ()

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857d8d8 ()

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857d92c ()

Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x4b5653 in calloc /home/kai/workspace/llvm-3.6.0.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56
#1 0x7fa1f857dc24 ()

SUMMARY: AddressSanitizer: 14637 byte(s) leaked in 60 allocation(s).

@frank-dittrich
Copy link
Collaborator

You actually waited for 1 hour?

Looks like ASan is broken for CUDA.
There's no reference to john's code, all leaks apparently originated from within ASan.

Is this on well?

@loverszhaokai
Copy link
Contributor Author

@frank-dittrich

You actually waited for 1 hour?

Almost one hour I think.

Is this on well?

It's on the super.

@frank-dittrich
Copy link
Collaborator

I see that you currently run

../john --nolog --skip-self-test --max-run-time=1 --list=cuda-devices --input-encoding=ISO-8859-7

on super.
Interesting combination of options ;)

@loverszhaokai
Copy link
Contributor Author

@frank-dittrich

Interesting combination of options ;)

I wrote a simple code which combines all the options. Here is the description:

http://www.openwall.com/lists/john-dev/2015/03/27/5

@magnumripper
Copy link
Member

This is virtually a dupe of #1231, which is IMO an invalid issue (or an issue for ASan, not us).

@claudioandre-br
Copy link
Member

This is virtually a dupe of #1231, which is IMO an invalid issue (or an issue for ASan, not us).

I agree, If a backtrace points to an OpenCL / CUDA library, you have to try to reproduce it in a regular JtR build (sometimes it is a real bug - see #1037).

Otherwise, It is invalid for JtR.

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

4 participants