Possibly crash with kernel disabling CONFIG_PROC_PID_CPUSET
Open
- Dominant language
- C++
- Stars
- 5.3k
- Forks
- 570
- Avg merge
- 23h 43m
- Merged PRs (30d)
- 172
Description
It assumes that /proc/self/cpuset exists here,
https://github.com/google/tcmalloc/blob/537629b16a632bbaaba5f77f31ced7e5fdde30e6/tcmalloc/internal/percpu.cc#L238
but actually this file doesn't exist if kernel has been built with CONFIG_PROC_PID_CPUSET=n.
when /proc/self/cpuset doesn't exist, open() must be failed and variable fd become negative, then it will crash here.
https://github.com/google/tcmalloc/blob/537629b16a632bbaaba5f77f31ced7e5fdde30e6/tcmalloc/internal/percpu.cc#L239
Contributor guide
Assessment
This issue has not been assessed yet.