Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
G
gtkmm
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 4
    • Merge Requests 4
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • gtkmm
  • Issues
  • #65

Closed
Open
Opened Jan 28, 2020 by Vielfraß@COM8

[wontfix for gtkmm-3] new-delete-type-mismatch on window close when compiled with -fsanitize=address

When you compile your application with -fsanitize=address, closing the window results in a new-delete-type-mismatch crash.

Example code

minimal.cpp
Based on: Programming with gtkmm 3- Simple Example

Compiling

g++ minimal.cpp -o simple `pkg-config gtkmm-3.0 --cflags --libs` -fsanitize=address

Executing

./simple

Once the program has started, click on the close button and you will see the following crash.

Crash

=================================================================
==11293==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x60b000072be0 in thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   104 bytes;
  size of the deallocated type: 48 bytes.
    #0 0x7f2ab928b0b5 in operator delete(void*, unsigned long) (/lib64/libasan.so.5+0x1110b5)
    #1 0x7f2ab88b8a2d in Glib::SignalProxyConnectionNode::destroy_notify_handler(void*, _GClosure*) (/lib64/libglibmm-2.4.so.1+0x6ca2d)
    #2 0x7f2ab7bfde23 in g_closure_unref (/lib64/libgobject-2.0.so.0+0x12e23)
    #3 0x7f2ab7c1921b in g_signal_handlers_destroy (/lib64/libgobject-2.0.so.0+0x2e21b)
    #4 0x7f2ab7c03290  (/lib64/libgobject-2.0.so.0+0x18290)
    #5 0x7f2ab84e764b  (/lib64/libgtk-3.so.0+0x3ae64b)
    #6 0x7f2ab7c05495 in g_object_run_dispose (/lib64/libgobject-2.0.so.0+0x1a495)
    #7 0x7f2ab8fc13af in Gtk::Window::_release_c_instance() (/lib64/libgtkmm-3.0.so.1+0x40e3af)
    #8 0x7f2ab8fc143f in Gtk::Window::~Window() (/lib64/libgtkmm-3.0.so.1+0x40e43f)
    #9 0x40141b in main (/home/fabian/Desktop/simple+0x40141b)
    #10 0x7f2ab75a7f42 in __libc_start_main (/lib64/libc.so.6+0x23f42)
    #11 0x40116d in _start (/home/fabian/Desktop/simple+0x40116d)

0x60b000072be0 is located 0 bytes inside of 104-byte region [0x60b000072be0,0x60b000072c48)
allocated by thread T0 here:
    #0 0x7f2ab92899d7 in operator new(unsigned long) (/lib64/libasan.so.5+0x10f9d7)
    #1 0x7f2ab8eec906 in Gtk::Application::add_window(Gtk::Window&) (/lib64/libgtkmm-3.0.so.1+0x339906)
    #2 0x7f2ab796ffff  (/lib64/libstdc++.so.6+0xa2fff)

SUMMARY: AddressSanitizer: new-delete-type-mismatch (/lib64/libasan.so.5+0x1110b5) in operator delete(void*, unsigned long)
==11293==HINT: if you don't care about these errors you may set ASAN_OPTIONS=new_delete_type_mismatch=0
==11293==ABORTING

Other Information

  • GTK version: gtk3-3.24.11-1
  • gtkmm version: gtkmm30-3.24.2-1
  • System: Fedora 30
  • GCC version: gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1)
Edited Feb 11, 2020 by Vielfraß
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/gtkmm#65