为什么运行 tsan 时 /proc/$pid/comm 的值会改变?

huangapple go评论51阅读模式
英文:

why the value of /proc/$pid/comm is changed running tsan?

问题

我使用tsan(ThreadSanitizer)编译程序,然后运行它。此外,我读取了该进程的/proc/$pid/comm文件,期望其值为程序的名称。但我得到了"exe",为什么?

./my_program

root     25515   712  0 09:40 pts/1    00:00:00 my_program

cat /proc/25515/comm
exe

使用gcc 7.3.0

我想知道comm文件的值发生了什么事情。

英文:

I compile program with tsan(ThreadSanitizer), and running it. Besides I read /proc/$pid/comm of this process, expect the value is program's name. But I got "exe", why?

./my_program

root     25515   712  0 09:40 pts/1    00:00:00 my_program

cat /proc/25515/comm
exe

use gcc 7.3.0

I want to know what happened the value of comm file.

答案1

得分: 0

这个问题是tsan重新执行名为"exe"的程序。源代码在这里。InitializePlatform。禁用ASLR可以解决这个问题。

英文:

This problem is tsan re-exec program with name "exe". source code here
InitializePlatform. disable ASLR can fix this problem.

huangapple
  • 本文由 发表于 2023年1月9日 09:43:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/75052510.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定