Crash when linking shared libraries of rocksdb and leveldb at the same time
Open
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
### Expected behavior
No errors at all.
### Actual behavior
Program will crash if linked with -lrocksdb -lleveldb in the given order
```
gcc -o 1.out 1.c -lrocksdb -lleveldb
./1.out
```
```
// 1.c
#include
#include
#include
int main(void)
{
return 0;
}
```
### Steps to reproduce the behavior
(Archlinux, all packages are up-to-date)
GCC 9.3.0
Rocksdb 6.7.3
Leveldb 1.22
Compile the program using the above command and run it, The program will crash with a Segmentation fault (core dump).
But if you swap the two -l arguments (put -lleveldb first), it works without problem.
[update] it still crashes later with -lleveldb -lrocksdb.
Contributor guide
Assessment
This issue has not been assessed yet.