Skip to main content
SBrid
Associate II
November 6, 2020
Question

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

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

This topic has been closed for replies.

1 reply

SBrid
SBridAuthor
Associate II
November 6, 2020

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)