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

__asan_handle_no_return undefined in lib for i386 #42

Closed
ramosian-glider opened this issue Aug 31, 2015 · 5 comments
Closed

__asan_handle_no_return undefined in lib for i386 #42

ramosian-glider opened this issue Aug 31, 2015 · 5 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 42

What steps will reproduce the problem?
1. Build latest Asan (r150801)
2. Try to build a i386 binary (my host is x86_64) that needs to call __asan_handle_no_return

What is the expected output? What do you see instead?

No output, I expect a working binary

› clang -g -faddress-sanitizer -fno-omit-frame-pointer -m32 -march=pentiumpro -pipe
-Dlinux -Di386 -ffunction-sections -fdata-sections -Wno-return-type no_return.c
/tmp/no_return-bDQzje.o: In function `functionA':
/tmp/no_return.c:7: undefined reference to `__asan_handle_no_return'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

If I remove the i386 flags it works.

What version of the product are you using? On what operating system?

Linux asa 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux

Distributor ID: Debian
Description:    Debian GNU/Linux 6.0 (squeeze)
Release:        6.0
Codename:       squeeze


Please provide any additional information below.

› nm lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a  | grep __asan_handle_no_return
                 U __asan_handle_no_return
00000000000009a0 T __asan_handle_no_return

› nm lib/clang/3.1/lib/linux/libclang_rt.asan-i386.a  | grep __asan_handle_no_return

Reported by mkvtoolnix.build.jonthn on 2012-02-17 13:57:58


- _Attachment: [no_return.c](https://storage.googleapis.com/google-code-attachments/address-sanitizer/issue-42/comment-0/no_return.c)_
@ramosian-glider
Copy link
Member Author

Everything works for me with r150810:


$ build/Release+Asserts/bin/clang -g -faddress-sanitizer -fno-omit-frame-pointer -m32
-march=pentiumpro -pipe -Dlinux -Di386 -ffunction-sections -fdata-sections  t.c -o
t
$ ./t
It works.

$ nm build/Release+Asserts/lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a  | grep
no_return
                 U __asan_handle_no_return
00000000000009a0 T __asan_handle_no_return

$ nm build/Release+Asserts/lib/clang/3.1/lib/linux/libclang_rt.asan-i386.a  | grep
no_return
000013c0 T __asan_handle_no_return
         U __asan_handle_no_return

Reported by ramosian.glider on 2012-02-17 15:29:05

@ramosian-glider
Copy link
Member Author

I tried again works for me too with r150828.

I probably messed up somewhere in the build/install sorry for the trouble.

Reported by mkvtoolnix.build.jonthn on 2012-02-17 19:12:37

@ramosian-glider
Copy link
Member Author

Just fyi, I also ran into this problem (the no_return symbol missing), and it turned
out that my compiler-rt rev was not in sync with my llvm/clang revs (higher llvm/clang
version). So if anyone else runs into this problem, make sure all three repos are on
the same version.

Reported by decoder.oh on 2012-02-20 00:08:33

@ramosian-glider
Copy link
Member Author

Ok, hope this can be closed now.

Reported by ramosian.glider on 2012-02-20 07:20:26

  • Status changed: Invalid

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:12:58

  • 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