Add ubsan bot to find ubsan issue

Description

We observe a UBSAN breakage on ICU72.1 in v8 testing

The downstream bug is

 

The stacktrace is

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../third_party/icu/source/common/ucmndata.cpp:284:45 in

Stderr:

../../third_party/icu/source/common/ucmndata.cpp:284:45: runtime error: member access within misaligned address 0x55e56bfed4bc for type 'const PointerTOC', which requires 8 byte alignment

0x55e56bfed4bc: note: pointer points here

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

^

#0 0x55e56e71a981 in pointerTOCLookupFn(UDataMemory const*, char const*, int*, UErrorCode*) third_party/icu/source/common/ucmndata.cpp:284:45

#1 0x55e56e719665 in doLoadFromCommonData(signed char, char const*, char const*, char const*, char const*, char const*, char const*, char const*, signed char (*)(void*, char const*, char const*, UDataInfo const*), void*, UErrorCode*, UErrorCode*) third_party/icu/source/common/udata.cpp:1075:21

#2 0x55e56e718e21 in doOpenChoice(char const*, char const*, char const*, signed char (*)(void*, char const*, char const*, UDataInfo const*), void*, UErrorCode*) third_party/icu/source/common/udata.cpp:1354:18

#3 0x55e56e77aac8 in res_load_72 third_party/icu/source/common/uresdata.cpp:266:20

#4 0x55e56e7793fb in init_entry(char const*, char const*, UErrorCode*) third_party/icu/source/common/uresbund.cpp:571:9

#5 0x55e56e7789a2 in findFirstExisting(char const*, char*, char const*, UResOpenType, signed char*, signed char*, signed char*, UErrorCode*) third_party/icu/source/common/uresbund.cpp:671:13

#6 0x55e56e774fc3 in entryOpen third_party/icu/source/common/uresbund.cpp:851:9

#7 0x55e56e774fc3 in ures_openWithType(UResourceBundle*, char const*, char const*, UResOpenType, UErrorCode*) third_party/icu/source/common/uresbund.cpp:2665:17

#8 0x55e56e61a132 in icu_72::TimeZoneNamesImpl::initialize(icu_72::Locale const&, UErrorCode&) third_party/icu/source/i18n/tznames_impl.cpp:1045:20

#9 0x55e56e6120ba in icu_72::TimeZoneNamesDelegate::TimeZoneNamesDelegate(icu_72::Locale const&, UErrorCode&) third_party/icu/source/i18n/tznames.cpp:160:23

#10 0x55e56e61377d in icu_72::TimeZoneNames::createInstance(icu_72::Locale const&, UErrorCode&) third_party/icu/source/i18n/tznames.cpp:311:24

Activity

Show:

Frank Yung-Fong Tang March 23, 2023 at 4:35 PM

We currently have problem to reproduce the “UBSAN breakage inside pointerTOCLookupFn” issue since that is observed only in a newer version of clang used in chromeium . This bug report was used to land the change to enable UBSAN bot in order to catch this kind of issue earlier. So I now rename the title of this bug to that but will track the fixing of that particular issue in some other bug later

Markus Scherer March 21, 2023 at 10:22 PM

  1. Please see my previous comment from Friday.

  2. In you added a UBSan CI check and fixed several problems, but now the CI check is passing and I don’t think it specifically did something about the PointerTOC issue reported here. Is that not reproducible?

Should we rename this ticket so that the name/title fits what PR #2324 actually did?

Markus Scherer March 17, 2023 at 3:25 PM

Hi now that I have merged could you rerun your test and see if anything got better?

Frank Yung-Fong Tang December 14, 2022 at 3:29 AM

So the issue it report has nothing to do with our recent changes in 72, but it just point out some new ubsan issue that previously the clang won’t report.

Frank Yung-Fong Tang December 14, 2022 at 3:28 AM

ok, I think I got totally confused by what happen. The breakage is not caused by icu71 to icu72 migration, but happen soon after that, during an upgrade of build tool. Such upgrade, surface new ubsan breakage which was not previously exposed. And those breakage is in both 71 and 72.

Fixed

Details

Assignee

Reporter

Components

Priority

Time Needed

Hours

Fix versions

Created December 6, 2022 at 8:45 PM
Updated March 23, 2023 at 4:36 PM
Resolved March 23, 2023 at 4:36 PM