google / google/sanitizers

Segfault in instrumented programs that use GNU indirect functions.

Open
#342 7 comments 0 reactions 1 assignee Claimed by @ramosian-glider View on GitHub
Priority-Medium ProjectAddressSanitizer Status-New Type-Defect
Dominant language
C
Stars
12.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Originally reported on Google Code with ID 342

```
What steps will reproduce the problem?
1. Testcase is attached. Compile with GCC with -fsanitize=address option.
2. Run.
3.

What is the expected output? What do you see instead?
Expected:
Got: Segmentation fault (core dumped).

What version of the product are you using? On what operating system?
Compiler: gcc version 5.0.0 20140916 (experimental) (GCC).
OS: Linux 3.2.0-56-generic #86-Ubuntu 12.04 x86_64 x86_64 x86_64 GNU/Linux

Please provide any additional information below.
It seems that resolution of indirect function's implementation happens before asan_init
invokes, so if ASan inserts red zones into resolver's stack, we will have segfault.
```

Reported by `chefMax7` on 2014-09-18 10:36:47



- _Attachment: [test-1.c](https://storage.googleapis.com/google-code-attachments/address-sanitizer/issue-342/comment-0/test-1.c)_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.