Crash on 64-bit Ubuntu 14.04, possible STL linkage issue

Issue #1765 resolved
Kai Arnold
created an issue

Tested with release 2454, 2357, and 2272. To reproduce:

1) on a fresh (or not) 64-bit Ubuntu VM, either:

a) build a new CEF binary distribution, or

b) download one from cefbuilds.com

2) apt-get install build-essentials and libX11-dev if you don't have them

3) add the following lines to the end of main() in cefsimple_linux.cc:

std::map<std::string, int> foo;

foo["one"] = 1;

4) a segfault occurs, usually in CefInitialize, and usually in some STL map code. The crash location and callstack are identical every time, although the actual stack varies depending on the CEF build version

See this thread for discussion, stack dumps, and valgrind output: http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=13543

Comments (9)

  1. Marshall Greenblatt

    Building with the proposed change (add version file) and:

    export GYP_DEFINES="disable_nacl=1 use_sysroot=1 buildtype=Official use_allocator=none"
    

    The following symbols are now exported:

    $ nm -D out/Release/lib/libcef.so | grep " T "
    00000000009eaa90 T calloc
    000000000081edb0 T cef_add_cross_origin_whitelist_entry
    0000000000821290 T cef_api_hash
    000000000081faa0 T cef_base64decode
    000000000081f990 T cef_base64encode
    00000000008206c0 T cef_begin_tracing
    0000000000822d00 T cef_binary_value_create
    00000000008248b0 T cef_browser_host_create_browser
    0000000000824bf0 T cef_browser_host_create_browser_sync
    00000000008277a0 T cef_browser_view_create
    0000000000827e80 T cef_browser_view_get_for_browser
    000000000081f0b0 T cef_clear_cross_origin_whitelist
    0000000000820550 T cef_clear_scheme_handler_factories
    000000000082bb30 T cef_command_line_create
    000000000082bdc0 T cef_command_line_get_global
    000000000082e800 T cef_cookie_manager_create_manager
    000000000082e630 T cef_cookie_manager_get_global_manager
    0000000000846510 T cef_create_context_shared
    000000000081f400 T cef_create_url
    0000000000820560 T cef_currently_on
    0000000000831870 T cef_dictionary_value_create
    0000000000833dc0 T cef_display_get_alls
    0000000000833db0 T cef_display_get_count
    0000000000833c30 T cef_display_get_matching_bounds
    0000000000833ab0 T cef_display_get_nearest_point
    0000000000833970 T cef_display_get_primary
    000000000081ecc0 T cef_do_message_loop_work
    0000000000835b70 T cef_drag_data_create
    000000000081ed00 T cef_enable_highdpi_support
    00000000008207f0 T cef_end_tracing
    000000000081e9b0 T cef_execute_process
    000000000081f5d0 T cef_format_url_for_security_display
    00000000008d7eb0 T cef_get_current_platform_thread_handle
    00000000008d7ea0 T cef_get_current_platform_thread_id
    000000000081f870 T cef_get_extensions_for_mime_type
    000000000081ed10 T cef_get_geolocation
    000000000081f720 T cef_get_mime_type
    00000000008d7de0 T cef_get_min_log_level
    0000000000820290 T cef_get_path
    00000000008d7df0 T cef_get_vlog_level
    0000000000951b20 T cef_get_xdisplay
    00000000008388e0 T cef_image_create
    000000000081eab0 T cef_initialize
    0000000000820c80 T cef_is_web_plugin_unstable
    0000000000839af0 T cef_label_button_create
    0000000000820330 T cef_launch_process
    000000000083ad20 T cef_list_value_create
    00000000008d7e00 T cef_log
    000000000083c810 T cef_menu_button_create
    000000000083cfd0 T cef_menu_model_create
    0000000000820920 T cef_now_from_system_trace_time
    000000000083fcc0 T cef_panel_create
    000000000081fe60 T cef_parse_json
    000000000081ff70 T cef_parse_jsonand_return_error
    000000000081f0c0 T cef_parse_url
    00000000008412c0 T cef_post_data_create
    0000000000841d70 T cef_post_data_element_create
    0000000000820610 T cef_post_delayed_task
    0000000000820570 T cef_post_task
    0000000000842700 T cef_print_settings_create
    00000000008437d0 T cef_process_message_create
    000000000081ece0 T cef_quit_message_loop
    0000000000820b50 T cef_refresh_web_plugins
    0000000000820930 T cef_register_extension
    00000000008203c0 T cef_register_scheme_handler_factory
    0000000000820bf0 T cef_register_web_plugin_crash
    000000000081ef50 T cef_remove_cross_origin_whitelist_entry
    0000000000846320 T cef_request_context_create_context
    00000000008460b0 T cef_request_context_get_global_context
    00000000008452c0 T cef_request_create
    00000000008494a0 T cef_resource_bundle_get_global
    0000000000849cc0 T cef_response_create
    000000000081ecd0 T cef_run_message_loop
    000000000084bad0 T cef_scroll_view_create
    000000000081ecf0 T cef_set_osmodal_loop
    000000000081ecb0 T cef_shutdown
    000000000084cc60 T cef_stream_reader_create_for_data
    000000000084ca90 T cef_stream_reader_create_for_file
    000000000084cdc0 T cef_stream_reader_create_for_handler
    000000000084d070 T cef_stream_writer_create_for_file
    000000000084d240 T cef_stream_writer_create_for_handler
    00000000008f4c20 T cef_string_ascii_to_utf16
    00000000008f4930 T cef_string_ascii_to_wide
    00000000008f3370 T cef_string_list_alloc
    00000000008f3400 T cef_string_list_append
    00000000008f3480 T cef_string_list_clear
    00000000008f3530 T cef_string_list_copy
    00000000008f34d0 T cef_string_list_free
    00000000008f3390 T cef_string_list_size
    00000000008f33b0 T cef_string_list_value
    00000000008f3560 T cef_string_map_alloc
    00000000008f3760 T cef_string_map_append
    00000000008f3950 T cef_string_map_clear
    00000000008f35a0 T cef_string_map_find
    00000000008f3980 T cef_string_map_free
    00000000008f3680 T cef_string_map_key
    00000000008f3590 T cef_string_map_size
    00000000008f36f0 T cef_string_map_value
    00000000008f3560 T cef_string_multimap_alloc
    00000000008f3bc0 T cef_string_multimap_append
    00000000008f3950 T cef_string_multimap_clear
    00000000008f3a50 T cef_string_multimap_enumerate
    00000000008f39a0 T cef_string_multimap_find_count
    00000000008f3980 T cef_string_multimap_free
    00000000008f3680 T cef_string_multimap_key
    00000000008f3590 T cef_string_multimap_size
    00000000008f36f0 T cef_string_multimap_value
    00000000008f3370 T cef_string_userfree_utf16_alloc
    00000000008f4d80 T cef_string_userfree_utf16_free
    00000000008f3370 T cef_string_userfree_utf8_alloc
    00000000008f4d80 T cef_string_userfree_utf8_free
    00000000008f3370 T cef_string_userfree_wide_alloc
    00000000008f4d80 T cef_string_userfree_wide_free
    00000000008f40b0 T cef_string_utf16_clear
    00000000008f42d0 T cef_string_utf16_cmp
    00000000008f4180 T cef_string_utf16_set
    00000000008f4840 T cef_string_utf16_to_utf8
    00000000008f4630 T cef_string_utf16_to_wide
    00000000008f40b0 T cef_string_utf8_clear
    00000000008f4280 T cef_string_utf8_cmp
    00000000008f40e0 T cef_string_utf8_set
    00000000008f4740 T cef_string_utf8_to_utf16
    00000000008f4420 T cef_string_utf8_to_wide
    00000000008f40b0 T cef_string_wide_clear
    00000000008f4230 T cef_string_wide_cmp
    00000000008f4000 T cef_string_wide_set
    00000000008f4530 T cef_string_wide_to_utf16
    00000000008f4330 T cef_string_wide_to_utf8
    000000000084d460 T cef_task_runner_get_for_current_thread
    000000000084d5a0 T cef_task_runner_get_for_thread
    000000000084da90 T cef_textfield_create
    00000000008f7070 T cef_time_delta
    00000000008f6fd0 T cef_time_from_doublet
    00000000008f6f20 T cef_time_from_timet
    00000000008f7020 T cef_time_now
    00000000008f6f70 T cef_time_to_doublet
    00000000008f6ed0 T cef_time_to_timet
    00000000008d6850 T cef_trace_counter
    00000000008d6ba0 T cef_trace_counter_id
    00000000008d6f00 T cef_trace_event_async_begin
    00000000008d79b0 T cef_trace_event_async_end
    00000000008d7330 T cef_trace_event_async_step_into
    00000000008d7670 T cef_trace_event_async_step_past
    00000000008d6010 T cef_trace_event_begin
    00000000008d6430 T cef_trace_event_end
    00000000008d5bf0 T cef_trace_event_instant
    000000000084f040 T cef_translator_test_create
    0000000000852a10 T cef_translator_test_object_child_child_create
    00000000008527d0 T cef_translator_test_object_child_create
    0000000000852450 T cef_translator_test_object_create
    0000000000820b60 T cef_unregister_internal_web_plugin
    000000000081fd00 T cef_uridecode
    000000000081fbb0 T cef_uriencode
    0000000000852c00 T cef_urlrequest_create
    0000000000853a80 T cef_v8context_get_current_context
    0000000000853c00 T cef_v8context_get_entered_context
    0000000000853d80 T cef_v8context_in_context
    0000000000854c30 T cef_v8stack_trace_get_current
    0000000000855850 T cef_v8value_create_array
    0000000000855330 T cef_v8value_create_bool
    0000000000855570 T cef_v8value_create_date
    00000000008554e0 T cef_v8value_create_double
    00000000008558e0 T cef_v8value_create_function
    00000000008553c0 T cef_v8value_create_int
    00000000008552a0 T cef_v8value_create_null
    0000000000855740 T cef_v8value_create_object
    0000000000855630 T cef_v8value_create_string
    0000000000855450 T cef_v8value_create_uint
    0000000000854ec0 T cef_v8value_create_undefined
    00000000008576b0 T cef_value_create
    0000000000821270 T cef_version_info
    0000000000820ab0 T cef_visit_web_plugin_info
    00000000008597c0 T cef_window_create_top_level
    0000000000820110 T cef_write_json
    000000000085b400 T cef_xml_reader_create
    000000000085c2a0 T cef_zip_reader_create
    00000000009ea9e0 T free
    000000000383b0c0 T localtime
    000000000383b570 T localtime_r
    00000000009eaa00 T malloc
    00000000009eac70 T posix_memalign
    00000000009eab30 T realloc
    
  2. Marshall Greenblatt

    Use of the version script in Debug builds causes the resulting application to crash:

    $ ./out/Debug/cefsimple 
    terminate called after throwing an instance of 'std::bad_cast'
      what():  std::bad_cast
    Aborted (core dumped)
    

    Version script restricted to release builds in master revision 80f5a35, 2743 branch revision ee28b94 and 2704 branch revision 42d8317. Also, don't use the version script in tcmalloc builds (see issue #1918).

  3. Log in to comment