RocksDB.loadLibrary() cause project crash
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
> Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev
have some java code, it's use the rocksdb to save some data, but when it's loadlibray, it's will cause crash: allocation-size-too-big.
```
public String function(String str) {
........
RocksDB.loadLibrary();
......
}
```
my project is java + cpp, so use a reflect to invoke the function,
have debugging when the line of loadLibrary cause crash, it's so strange.
```
==715019==ERROR: AddressSanitizer: requested allocation size 0x603002cb5239 (0x603002cb6240 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T414 (PipeNoGSchePool))
#0 0x561b494c6707 in operator new(unsigned long)
#1 0x561b4953377d in __gnu_cxx::new_allocator::allocate(unsigned long, void const*) /install_data/ldb_toolchain/include/c++/11/ext/new_allocator.h:121
#2 0x561b4952758b in std::allocator::allocate(unsigned long) /install_data/ldb_toolchain/include/c++/11/bits/allocator.h:173
#3 0x561b4952758b in std::allocator_traits >::allocate(std::allocator&, unsigned long) /install_data/ldb_toolchain/include/c++/11/bits/alloc_traits.h:460
#4 0x561b4952e301 in std::__cxx11::basic_string, std::allocator >::_M_create(unsigned long&, unsigned long) /install_data/ldb_toolchain/include/c++/11/bits/basic_string.tcc:153
#5 0x561b49536678 in void std::__cxx11::basic_string, std::allocator >::_M_construct(char*, char*, std::forward_iterator_tag) /install_data/ldb_toolchain/include/c++/11/bits/basic_string.tcc:219
#6 0x561b74003e8e in std::map, std::allocator > >::map(std::initializer_list >, std::less const&, std::allocator > const&)
#7 0x7f7447de8492 (/tmp/librocksdbjni3872642940403144838.so+0x1ef492)
#8 0x7f7b445c18b9 in call_init.part.0 (/lib64/ld-linux-x86-64.so.2+0xf8b9)
```
### Expected behavior
### Actual behavior
### Steps to reproduce the behavior
Contributor guide
Assessment
This issue has not been assessed yet.