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: Disable for CentOS7 because LD_PRELOAD issue. #3347

Closed
winlinvip opened this issue Dec 30, 2022 · 0 comments · Fixed by #3352
Closed

Asan: Disable for CentOS7 because LD_PRELOAD issue. #3347

winlinvip opened this issue Dec 30, 2022 · 0 comments · Fixed by #3352
Assignees
Labels
EnglishNative This issue is conveyed exclusively in English. Enhancement Improvement or enhancement.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Dec 30, 2022

Description

For CentOS7, we got error as bellow, see google/sanitizers#796 for detail:

==48458==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
  1. SRS Version: 5.0.119

  2. SRS Log:

==48458==ASan runtime does not come first in initial library list; you should either link 
runtime to your application or manually preload it with LD_PRELOAD.
  1. SRS Config:
./objs/srs -c conf/srs.conf

Replay

CentOS 7.

Step 1: Link asan by shared library.

./configure --sanitizer=on --sanitizer-static=off && make

Step 2: Run SRS

./objs/srs -c conf/srs.conf

#==48458==ASan runtime does not come first in initial library list; you should either link 
# runtime to your application or manually preload it with LD_PRELOAD.

There is a workaround:

env LD_PRELOAD=/lib64/libasan.so.5 ./objs/srs -c conf/srs.conf
@winlinvip winlinvip added the Enhancement Improvement or enhancement. label Dec 30, 2022
@winlinvip winlinvip added this to the 5.0 milestone Dec 30, 2022
winlinvip pushed a commit to chen-guanghua/srs that referenced this issue Jan 2, 2023
….0.127 (ossrs#3347)

1. Disable asan for all CentOS by default, however user could enable it.
2. Link asan statically if possible.
winlinvip added a commit that referenced this issue Jan 2, 2023
….0.127 (#3347) (#3352)

* Asan: Disable asan for CentOS and use statically link if possible. v5.0.127 (#3347)

1. Disable asan for all CentOS by default, however user could enable it.
2. Link asan statically if possible.

* Update version to v5.0.127

Co-authored-by: winlin <winlin@vip.126.com>
winlinvip pushed a commit that referenced this issue Jan 2, 2023
…le. v5.0.127 (#3347) (#3352)

* Asan: Disable asan for CentOS and use statically link if possible. v5.0.127 (#3347)

1. Disable asan for all CentOS by default, however user could enable it.
2. Link asan statically if possible.

* Update version to v5.0.127

Co-authored-by: winlin <winlin@vip.126.com>

PICK dd0f398
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English. Enhancement Improvement or enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants