Download

crash when using C++ "new (std::nothrow) + delete" in a .so called by UE4

Hello, Here’s my current issue.

I have built a .so lib using C++, in which I use new (std::nothrow) and delete.
Then I called the function in this .so in UE4, it crashed on the delete operation with this log:

17:07:22.780 17636-17636/? A/DEBUG: backtrace:
17:07:22.780 17636-17636/? A/DEBUG: #00 pc 000000000005be64 /apex/com.android.runtime/lib64/bionic/libc.so (ifree+88) (BuildId: 084953f8f5198acc841653c0a2c76779)
17:07:22.780 17636-17636/? A/DEBUG: #01 pc 000000000005c3c8 /apex/com.android.runtime/lib64/bionic/libc.so (je_free+120) (BuildId: 084953f8f5198acc841653c0a2c76779)

The return value of the new (std::nothrow) operation is not nullptr, why it crashed on the delete step?