llvm-project
522880cb - [compiler-rt][RISCV] Avoid using __init_riscv_feature_bits as a direc… (#115316)

Commit
1 year ago
[compiler-rt][RISCV] Avoid using __init_riscv_feature_bits as a direc… (#115316) …t constructor `__init_riscv_feature_bits` takes an argument that can be platform-specific, potentially pointing to the VDSO address of the hwprobe system call for Linux. However, marking it as a constructor does not guarantee that 0/NULL will always be passed to this argument, which may result in treating an uninitialized or garbage value as a pointer to hwprobe, leading to a crash. The simplest solution is to introduce a small constructor function to ensure that the platform-specific argument is set to 0/NULL.
Author
Parents
Loading