{"action":"created","issue":{"url":"https://api.github.com/repos/boostorg/function/issues/29","repository_url":"https://api.github.com/repos/boostorg/function","labels_url":"https://api.github.com/repos/boostorg/function/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/boostorg/function/issues/29/comments","events_url":"https://api.github.com/repos/boostorg/function/issues/29/events","html_url":"https://github.com/boostorg/function/pull/29","id":372626025,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NzU5NDA1","number":29,"title":"Add minimal test for UBSan failures","user":{"login":"mloskot","id":80741,"node_id":"MDQ6VXNlcjgwNzQx","avatar_url":"https://avatars2.githubusercontent.com/u/80741?v=4","gravatar_id":"","url":"https://api.github.com/users/mloskot","html_url":"https://github.com/mloskot","followers_url":"https://api.github.com/users/mloskot/followers","following_url":"https://api.github.com/users/mloskot/following{/other_user}","gists_url":"https://api.github.com/users/mloskot/gists{/gist_id}","starred_url":"https://api.github.com/users/mloskot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mloskot/subscriptions","organizations_url":"https://api.github.com/users/mloskot/orgs","repos_url":"https://api.github.com/users/mloskot/repos","events_url":"https://api.github.com/users/mloskot/events{/privacy}","received_events_url":"https://api.github.com/users/mloskot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-22T17:51:14Z","updated_at":"2018-10-22T23:04:40Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/boostorg/function/pulls/29","html_url":"https://github.com/boostorg/function/pull/29","diff_url":"https://github.com/boostorg/function/pull/29.diff","patch_url":"https://github.com/boostorg/function/pull/29.patch"},"body":"_(this is an issue report but with mwe to reproduce it as per @pdimov suggestion on Slack)_\r\n\r\nReproduced with clang 5.0 and 6.0 on Linux using Boost super-project at `master` as well as Function at `develop`:\r\n\r\n```shell\r\ncd libs/function/test/ubsan_undefined_bug\r\nb2 toolset=clang variant=ubsan_undefined\r\n```\r\n\r\n-----\r\n\r\nFull log:\r\n\r\n```shell\r\n$ b2 toolset=clang variant=ubsan_undefined\r\nPerforming configuration checks\r\n\r\n    - default address-model    : 64-bit\r\n    - default architecture     : x86\r\n    - symlinks supported       : yes\r\n    - BOOST_COMP_GNUC >= 4.3.0 : no\r\n...patience...\r\n...found 2941 targets...\r\n...updating 61 targets...\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/system/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/error_code.o\r\nclang-linux.link.dll ../../../../bin.v2/libs/system/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/libboost_system.so.1.69.0\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/timer/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/auto_timers_construction.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/chrono/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/chrono.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/chrono/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/thread_clock.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/compiler_log_formatter.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/debug.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/chrono/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/process_cpu_clocks.o\r\nclang-linux.link.dll ../../../../bin.v2/libs/chrono/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/libboost_chrono.so.1.69.0\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/timer/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/cpu_timer.o\r\nclang-linux.link.dll ../../../../bin.v2/libs/timer/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/libboost_timer.so.1.69.0\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/plain_report_formatter.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/progress_monitor.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/decorator.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/execution_monitor.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test_framework_init_observer.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/results_collector.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/results_reporter.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/unit_test_monitor.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test_tools.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/unit_test_main.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/unit_test_log.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test_tree.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/xml_log_formatter.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/xml_report_formatter.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/framework.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/junit_log_formatter.o\r\nclang-linux.compile.c++.without-pth ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/unit_test_parameters.o\r\nclang-linux.link.dll ../../../../bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/libboost_unit_test_framework.so.1.69.0\r\nclang-linux.link ../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test\r\ntesting.capture-output ../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test.run\r\n====== BEGIN OUTPUT ======\r\n../../../../boost/function/function_template.hpp:768:14: runtime error: call to function (unknown) through pointer to incorrect function type 'void (*)(boost::detail::function::function_buffer &)'\r\n(/mnt/d/boost.wsl/bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test+0x42cf60): note: (unknown) defined here\r\n\r\nEXIT STATUS: 1\r\n====== END OUTPUT ======\r\n\r\n    LD_LIBRARY_PATH=\"/mnt/d/boost.wsl/bin.v2/libs/chrono/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden:/mnt/d/boost.wsl/bin.v2/libs/system/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden:/mnt/d/boost.wsl/bin.v2/libs/test/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden:/mnt/d/boost.wsl/bin.v2/libs/timer/build/clang-linux-6.0.0/ubsan_undefined/visibility-hidden:$LD_LIBRARY_PATH\"\r\nexport LD_LIBRARY_PATH\r\n\r\n    status=0\r\n    if test $status -ne 0 ; then\r\n        echo Skipping test execution due to testing.execute=off\r\n        exit 0\r\n    fi\r\n     \"../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test\"   > \"../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test.output\" 2>&1 < /dev/null\r\n    status=$?\r\n    echo >> \"../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test.output\"\r\n    echo EXIT STATUS: $status >> \"../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test.output\"\r\n    if test $status -eq 0 ; then\r\n        cp \"../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test.output\" \"../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test.run\"\r\n    fi\r\n    verbose=0\r\n    if test $status -ne 0 ; then\r\n        verbose=1\r\n    fi\r\n    if test $verbose -eq 1 ; then\r\n        echo ====== BEGIN OUTPUT ======\r\n        cat \"../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test.output\"\r\n        echo ====== END OUTPUT ======\r\n    fi\r\n    exit $status\r\n\r\n...failed testing.capture-output ../../../../bin.v2/libs/function/test/ubsan_undefined_bug/test.test/clang-linux-6.0.0/ubsan_undefined/visibility-hidden/test.run...\r\n...failed updating 1 target...\r\n...skipped 1 target...\r\n...updated 59 targets...\r\nmloskot@bionic:/mnt/d/boost.wsl/libs/function/test/ubsan_undefined_bug$\r\n```\r\n\r\nOriginally, the issue was discovered while running Boost.GIL tests."},"comment":{"url":"https://api.github.com/repos/boostorg/function/issues/comments/432022100","html_url":"https://github.com/boostorg/function/pull/29#issuecomment-432022100","issue_url":"https://api.github.com/repos/boostorg/function/issues/29","id":432022100,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjAyMjEwMA==","user":{"login":"swatanabe","id":82176,"node_id":"MDQ6VXNlcjgyMTc2","avatar_url":"https://avatars3.githubusercontent.com/u/82176?v=4","gravatar_id":"","url":"https://api.github.com/users/swatanabe","html_url":"https://github.com/swatanabe","followers_url":"https://api.github.com/users/swatanabe/followers","following_url":"https://api.github.com/users/swatanabe/following{/other_user}","gists_url":"https://api.github.com/users/swatanabe/gists{/gist_id}","starred_url":"https://api.github.com/users/swatanabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swatanabe/subscriptions","organizations_url":"https://api.github.com/users/swatanabe/orgs","repos_url":"https://api.github.com/users/swatanabe/repos","events_url":"https://api.github.com/users/swatanabe/events{/privacy}","received_events_url":"https://api.github.com/users/swatanabe/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T23:04:40Z","updated_at":"2018-10-22T23:04:40Z","author_association":"CONTRIBUTOR","body":"AMDG\n\nOn 10/22/2018 04:37 PM, James E. King III wrote:\n> \n> This looks like a Boost.Test issue, not a Boost.Function issue?\n> \n\n  Maybe, maybe not.  Boost.Test uses Boost.Function,\nand the issue does show up in function.  It's a\nbit hard to tell what's going on with just the\noutput shown.  I'd tend to suspect Function more\nthan Test, given that all the type casting in Function\nis liable to result in exactly this sort of error\nif it's wrong.  Anyway, the test case is definitely\nnot minimal if the problem is in fact in function.\n\nIn Christ,\nSteven Watanabe\n"}}
{"actor":{"display_login":"swatanabe"}}