[Bug 2089788] [NEW] GDB crash on simple C++ program debugging

2024-11-27 Thread Stéphane Perras
Public bug reported: On Noble 24.04, with default build-essential and gdb, printing the value of a std::basic_string with a custom allocator class (std::basic_string::, CUSTOM_ALLOCATOR_CLASS>) causes a floating point exception in GDB. Compile this program with debugging information, break on the

[Bug 2089693] Re: Division by 0 in GDB when printing std::string with custom memory allocator

2024-11-27 Thread Stéphane Perras
** Summary changed: - Division by 0 in GDB when printing std::string with custom TBB memory allocator + Division by 0 in GDB when printing std::string with custom memory allocator -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https

[Bug 2089693] Re: Division by 0 in GDB when printing std::string with custom TBB memory allocator

2024-11-26 Thread Stéphane Perras
Further note, I have been able to reproduce the crash in GDB without having to link to TBB at all, and modifying the TBBAllocator class in gdbtestcrash.cpp to simply call malloc() and free(). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubu

[Bug 2089693] [NEW] Division by 0 in GDB when printing std::string with custom TBB memory allocator

2024-11-26 Thread Stéphane Perras
Public bug reported: I wrote a simple C++ application that links with TBB::tbbmalloc. I have defined a class called TBBAllocator that implements the std::allocator archetype, and that calls TBB's scalable_malloc and scalable_free to deal with memory allocations. Then I have instantiated a std::s