cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a pure virtual function after explicitly calling C++ a de-constructor, causes __cxa_pure_virtual() hang

SBrid
Associate II

Hi all.

I've wrote my own custom allocator using C++'s templates and all is working as expected. However, during my deallocation, I call an object's virtual de-constructor which executes the user's de-constructors . However, the next time I allocate the same object and call any of its virtual functions not related to de-constructors, my program hangs within __cxa_pure_virtual().

Are there any limits with the arm compiler included with the stm32cudeide that could be causing the above issue?

Thanks

1 REPLY 1
SBrid
Associate II

Also, when I define the following:

extern "C" void __cxa_pure_virtual() {}

The issue disappears but the object's data is screwed up (doesn't reflect the values I've set within the de-constructor after inspection)