Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'npm run integration' crash on M1 #128

Closed
1 task done
devjiangzhou opened this issue Nov 20, 2022 · 0 comments
Closed
1 task done

'npm run integration' crash on M1 #128

devjiangzhou opened this issue Nov 20, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@devjiangzhou
Copy link
Contributor

devjiangzhou commented Nov 20, 2022

Affected version

main

No same issues found.

  • Yes, I search all issues but not found.

Steps to Reproduce

@ErosZy @andycall

  1. npm install
  2. ENABLE_ASAN=true npm run build:bridge:macos
  3. cd integration_tests
  4. SPEC_SCOPE="DOM" npm run integration

Code example

SPEC_SCOPE="DOM" npm run integration

Expected results

The specs in integration_tests is wored

Actual results

> Building macOS application...
flutter: The Dart VM service is listening on http://127.0.0.1:54802/7pgRxvKGpv0=/
flutter: Local HTTP server started at: http://127.0.0.1:24434
=================================================================
==62855==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000105c3a9be at pc 0x000104a1b150 bp 0x00016bb66750 sp 0x00016bb66748
READ of size 1 at 0x000105c3a9be thread T4
    0 0x104a1b14c in JS_ReadFunctionTag bytecode.c:1589
    1 0x104a14fb4 in JS_ReadObjectRec bytecode.c:2002
    2 0x104a1a998 in JS_ReadFunctionTag bytecode.c:1622
    3 0x104a14fb4 in JS_ReadObjectRec bytecode.c:2002
    4 0x104a1a998 in JS_ReadFunctionTag bytecode.c:1622
    5 0x104a14fb4 in JS_ReadObjectRec bytecode.c:2002
    6 0x104a14770 in JS_ReadObject bytecode.c:2132
    7 0x10582c3e4 in webf::ExecutingContext::EvaluateByteCode(unsigned char*, unsigned long) executing_context.cc:144
    8 0x105800080 in initWebFPolyFill(webf::ExecutingContext*) polyfill.cc:12
    9 0x10582b4a4 in webf::ExecutingContext::ExecutingContext(int, std::__1::function<void (webf::ExecutingContext*, char const*)>, void*, unsigned long long const*, int) executing_context.cc:78
    10 0x10582c558 in webf::ExecutingContext::ExecutingContext(int, std::__1::function<void (webf::ExecutingContext*, char const*)>, void*, unsigned long long const*, int) executing_context.cc:37
    11 0x105837b68 in webf::WebFPage::WebFPage(int, std::__1::function<void (webf::ExecutingContext*, char const*)> const&, unsigned long long const*, int) page.cc:31
    12 0x105837db4 in webf::WebFPage::WebFPage(int, std::__1::function<void (webf::ExecutingContext*, char const*)> const&, unsigned long long const*, int) page.cc:30
    13 0x1057eabf4 in initJSPagePool webf_bridge.cc:86
    14 0x11b5866a4  (<unknown module>)
    15 0x130e11b60  (<unknown module>)
    16 0x130e0d070  (<unknown module>)
    17 0x130e07908  (<unknown module>)
    18 0x130e06bdc  (<unknown module>)
    19 0x12bf7d450  (<unknown module>)
    20 0x12d67d790  (<unknown module>)
    21 0x12970f424  (<unknown module>)
    22 0x12974d0a4  (<unknown module>)
    23 0x12d67c984  (<unknown module>)
    24 0x12d67c74c  (<unknown module>)
    25 0x129718b5c  (<unknown module>)
    26 0x129717bf0  (<unknown module>)
    27 0x12974d16c  (<unknown module>)
    28 0x129718b5c  (<unknown module>)
    29 0x129717bf0  (<unknown module>)
    30 0x129720518  (<unknown module>)
    31 0x12971eca4  (<unknown module>)
    32 0x12971e584  (<unknown module>)
    33 0x12971bf98  (<unknown module>)
    34 0x129718b5c  (<unknown module>)
    35 0x129717bf0  (<unknown module>)
    36 0x129720518  (<unknown module>)
    37 0x12971fb28  (<unknown module>)
    38 0x12971eca4  (<unknown module>)
    39 0x12971e584  (<unknown module>)
    40 0x12971cfc8  (<unknown module>)
    41 0x12971bf98  (<unknown module>)
    42 0x129718b5c  (<unknown module>)
    43 0x129717bf0  (<unknown module>)
    44 0x12974d16c  (<unknown module>)
    45 0x129718b5c  (<unknown module>)
    46 0x129717bf0  (<unknown module>)
    47 0x129720518  (<unknown module>)
    48 0x12971eca4  (<unknown module>)
    49 0x12971e584  (<unknown module>)
    50 0x12971bf98  (<unknown module>)
    51 0x129718b5c  (<unknown module>)
    52 0x129717bf0  (<unknown module>)
    53 0x129720518  (<unknown module>)
    54 0x12971fb28  (<unknown module>)
    55 0x12971eca4  (<unknown module>)
    56 0x12971e584  (<unknown module>)
    57 0x12971cfc8  (<unknown module>)
    58 0x12971bf98  (<unknown module>)
    59 0x129718b5c  (<unknown module>)
    60 0x129717bf0  (<unknown module>)
    61 0x129720518  (<unknown module>)
    62 0x12971fb28  (<unknown module>)
    63 0x12971eca4  (<unknown module>)
    64 0x12971e584  (<unknown module>)
    65 0x12971cfc8  (<unknown module>)
    66 0x12971bf98  (<unknown module>)
    67 0x129718b5c  (<unknown module>)
    68 0x129717bf0  (<unknown module>)
    69 0x12974d16c  (<unknown module>)
    70 0x129718b5c  (<unknown module>)
    71 0x129717bf0  (<unknown module>)
    72 0x129720518  (<unknown module>)
    73 0x12971fb28  (<unknown module>)
    74 0x12971eca4  (<unknown module>)
    75 0x12971e584  (<unknown module>)
    76 0x12971cfc8  (<unknown module>)
    77 0x12971bf98  (<unknown module>)
    78 0x129718b5c  (<unknown module>)
    79 0x129717bf0  (<unknown module>)
    80 0x129720518  (<unknown module>)
    81 0x12971fb28  (<unknown module>)
    82 0x12971eca4  (<unknown module>)
    83 0x12971e584  (<unknown module>)
    84 0x12971cfc8  (<unknown module>)
    85 0x12971bf98  (<unknown module>)
    86 0x129718b5c  (<unknown module>)
    87 0x12d62bd48  (<unknown module>)
    88 0x12d628074  (<unknown module>)
    89 0x129718b5c  (<unknown module>)
    90 0x129717bf0  (<unknown module>)
    91 0x129720518  (<unknown module>)
    92 0x12971eca4  (<unknown module>)
    93 0x12971e584  (<unknown module>)
    94 0x12971bf98  (<unknown module>)
    95 0x129718b5c  (<unknown module>)
    96 0x129717bf0  (<unknown module>)
    97 0x129720518  (<unknown module>)
    98 0x12971eca4  (<unknown module>)
    99 0x12971e584  (<unknown module>)
    100 0x12971bf98  (<unknown module>)
    101 0x129718b5c  (<unknown module>)
    102 0x129717bf0  (<unknown module>)
    103 0x129720518  (<unknown module>)
    104 0x12971eca4  (<unknown module>)
    105 0x12971e584  (<unknown module>)
    106 0x12971bf98  (<unknown module>)
    107 0x129718b5c  (<unknown module>)
    108 0x12d62bd48  (<unknown module>)
    109 0x12d628074  (<unknown module>)
    110 0x129718b5c  (<unknown module>)
    111 0x129717bf0  (<unknown module>)
    112 0x129720518  (<unknown module>)
    113 0x12971fb28  (<unknown module>)
    114 0x12971eca4  (<unknown module>)
    115 0x12971e584  (<unknown module>)
    116 0x12971cfc8  (<unknown module>)
    117 0x12971bf98  (<unknown module>)
    118 0x129718b5c  (<unknown module>)
    119 0x129717bf0  (<unknown module>)
    120 0x129720518  (<unknown module>)
    121 0x12971eca4  (<unknown module>)
    122 0x12971e584  (<unknown module>)
    123 0x12971bf98  (<unknown module>)
    124 0x129718b5c  (<unknown module>)
    125 0x129717bf0  (<unknown module>)
    126 0x129720518  (<unknown module>)
    127 0x12971fb28  (<unknown module>)
    128 0x12971eca4  (<unknown module>)
    129 0x12971e584  (<unknown module>)
    130 0x12971cfc8  (<unknown module>)
    131 0x12971bf98  (<unknown module>)
    132 0x129718b5c  (<unknown module>)
    133 0x129717bf0  (<unknown module>)
    134 0x12974d16c  (<unknown module>)
    135 0x129718b5c  (<unknown module>)
    136 0x129717bf0  (<unknown module>)
    137 0x129720518  (<unknown module>)
    138 0x12971eca4  (<unknown module>)
    139 0x12971e584  (<unknown module>)
    140 0x12971bf98  (<unknown module>)
    141 0x129718b5c  (<unknown module>)
    142 0x129717bf0  (<unknown module>)
    143 0x12974d16c  (<unknown module>)
    144 0x129718b5c  (<unknown module>)
    145 0x129717bf0  (<unknown module>)
    146 0x129720518  (<unknown module>)
    147 0x12971fb28  (<unknown module>)
    148 0x12971eca4  (<unknown module>)
    149 0x12971e584  (<unknown module>)
    150 0x12971cfc8  (<unknown module>)
    151 0x12971bf98  (<unknown module>)
    152 0x129718b5c  (<unknown module>)
    153 0x129717bf0  (<unknown module>)
    154 0x129720518  (<unknown module>)
    155 0x12971fb28  (<unknown module>)
    156 0x12971eca4  (<unknown module>)
    157 0x12971e584  (<unknown module>)
    158 0x12971cfc8  (<unknown module>)
    159 0x12971bf98  (<unknown module>)
    160 0x129718b5c  (<unknown module>)
    161 0x129717bf0  (<unknown module>)
    162 0x129720518  (<unknown module>)
    163 0x12971eca4  (<unknown module>)
    164 0x12971e584  (<unknown module>)
    165 0x12971bf98  (<unknown module>)
    166 0x129718b5c  (<unknown module>)
    167 0x129717bf0  (<unknown module>)
    168 0x129720518  (<unknown module>)
    169 0x12971eca4  (<unknown module>)
    170 0x12971e584  (<unknown module>)
    171 0x12971bf98  (<unknown module>)
    172 0x129718b5c  (<unknown module>)
    173 0x129717bf0  (<unknown module>)
    174 0x129720518  (<unknown module>)
    175 0x12971fb28  (<unknown module>)
    176 0x12971eca4  (<unknown module>)
    177 0x12971e584  (<unknown module>)
    178 0x12971cfc8  (<unknown module>)
    179 0x12971bf98  (<unknown module>)
    180 0x129718b5c  (<unknown module>)
    181 0x129717bf0  (<unknown module>)
    182 0x129720518  (<unknown module>)
    183 0x12971eca4  (<unknown module>)
    184 0x12971e584  (<unknown module>)
    185 0x12971bf98  (<unknown module>)
    186 0x129718b5c  (<unknown module>)
    187 0x129717bf0  (<unknown module>)
    188 0x129720518  (<unknown module>)
    189 0x12971fb28  (<unknown module>)
    190 0x12971eca4  (<unknown module>)
    191 0x12971e584  (<unknown module>)
    192 0x12971cfc8  (<unknown module>)
    193 0x12971bf98  (<unknown module>)
    194 0x129718b5c  (<unknown module>)
    195 0x129717bf0  (<unknown module>)
    196 0x12974d16c  (<unknown module>)
    197 0x129718b5c  (<unknown module>)
    198 0x129717bf0  (<unknown module>)
    199 0x129720518  (<unknown module>)
    200 0x12971eca4  (<unknown module>)
    201 0x12971e584  (<unknown module>)
    202 0x12971bf98  (<unknown module>)
    203 0x129718b5c  (<unknown module>)
    204 0x129717bf0  (<unknown module>)
    205 0x12974d16c  (<unknown module>)
    206 0x129718b5c  (<unknown module>)
    207 0x129717bf0  (<unknown module>)
    208 0x12974d16c  (<unknown module>)
    209 0x129718b5c  (<unknown module>)
    210 0x129717bf0  (<unknown module>)
    211 0x129720518  (<unknown module>)
    212 0x12971fb28  (<unknown module>)
    213 0x12971eca4  (<unknown module>)
    214 0x12971e584  (<unknown module>)
    215 0x12971cfc8  (<unknown module>)
    216 0x12971bf98  (<unknown module>)
    217 0x129718b5c  (<unknown module>)
    218 0x12d62bd48  (<unknown module>)
    219 0x12d628074  (<unknown module>)
    220 0x129718b5c  (<unknown module>)
    221 0x129717bf0  (<unknown module>)
    222 0x129720518  (<unknown module>)
    223 0x12971fb28  (<unknown module>)
    224 0x12971eca4  (<unknown module>)
    225 0x12971e584  (<unknown module>)
    226 0x12971cfc8  (<unknown module>)
    227 0x12971bf98  (<unknown module>)
    228 0x129718b5c  (<unknown module>)
    229 0x129717bf0  (<unknown module>)
    230 0x12974d16c  (<unknown module>)
    231 0x129718b5c  (<unknown module>)
    232 0x129717bf0  (<unknown module>)
    233 0x129720518  (<unknown module>)
    234 0x12971fb28  (<unknown module>)
    235 0x12971eca4  (<unknown module>)
    236 0x12971e584  (<unknown module>)
    237 0x12971cfc8  (<unknown module>)
    238 0x12971bf98  (<unknown module>)
    239 0x129718b5c  (<unknown module>)
    240 0x129717bf0  (<unknown module>)
    241 0x12974d16c  (<unknown module>)
    242 0x129718b5c  (<unknown module>)
    243 0x129717bf0  (<unknown module>)
    244 0x129720518  (<unknown module>)
    245 0x12971fb28  (<unknown module>)
    246 0x12971eca4  (<unknown module>)
    247 0x12971e584  (<unknown module>)
    248 0x12971cfc8  (<unknown module>)
    249 0x12971bf98  (<unknown module>)
    250 0x129718b5c  (<unknown module>)
    251 0x129717bf0  (<unknown module>)
    252 0x12974d16c  (<unknown module>)
    253 0x129718b5c  (<unknown module>)
    254 0x129717bf0  (<unknown module>)
    255 0x129720518  (<unknown module>)

0x000105c3a9be is located 0 bytes to the right of global variable '(anonymous namespace)::bytes' defined in '/Users/jiangzhou/Documents/tools/webf/bridge/polyfill/dist/polyfill.cc:9:9' (0x105c325a0) of size 33822
SUMMARY: AddressSanitizer: global-buffer-overflow bytecode.c:1589 in JS_ReadFunctionTag
Shadow bytes around the buggy address:
  0x007020ba74e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x007020ba74f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x007020ba7500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x007020ba7510: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x007020ba7520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x007020ba7530: 00 00 00 00 00 00 00[06]f9 f9 f9 f9 f9 f9 f9 f9
  0x007020ba7540: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x007020ba7550: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x007020ba7560: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x007020ba7570: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x007020ba7580: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
Thread T4 created by T0 here:
    0 0x10644df58 in wrap_pthread_create+0x54 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x39f58)
    1 0x108e63570 in fml::Thread::Thread(std::__1::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)+0x228 (FlutterMacOS:arm64+0x6b570)
    2 0x109489a50 in flutter::ThreadHost::CreateThread(flutter::ThreadHost::Type, std::__1::optional<fml::Thread::ThreadConfig>, flutter::ThreadHost::ThreadHostConfig const&) const+0xd8 (FlutterMacOS:arm64+0x691a50)
    3 0x109489c64 in flutter::ThreadHost::ThreadHost(flutter::ThreadHost::ThreadHostConfig const&)+0x118 (FlutterMacOS:arm64+0x691c64)
    4 0x109624f28 in flutter::EmbedderThreadHost::CreateEmbedderManagedThreadHost(FlutterCustomTaskRunners const*, std::__1::function<void (fml::Thread::ThreadConfig const&)>)+0x30c (FlutterMacOS:arm64+0x82cf28)
    5 0x109624ab8 in flutter::EmbedderThreadHost::CreateEmbedderOrEngineManagedThreadHost(FlutterCustomTaskRunners const*, std::__1::function<void (fml::Thread::ThreadConfig const&)>)+0x88 (FlutterMacOS:arm64+0x82cab8)
    6 0x109606290 in FlutterEngineInitialize+0xe14 (FlutterMacOS:arm64+0x80e290)
    7 0x108e063b0 in -[FlutterEngine runWithEntrypoint:]+0x4e8 (FlutterMacOS:arm64+0xe3b0)
    8 0x108e21644 in -[FlutterViewController launchEngine]+0x5c (FlutterMacOS:arm64+0x29644)
    9 0x108e21398 in -[FlutterViewController viewWillAppear]+0x68 (FlutterMacOS:arm64+0x29398)
    10 0x18c6e7798 in -[NSViewController _sendViewWillAppear]+0x2c (AppKit:arm64e+0x17a798)
    11 0x18c6e7624 in -[NSViewController _windowWillOrderOnScreen]+0x64 (AppKit:arm64e+0x17a624)
    12 0x18ce42ae0 in -[NSView _windowWillOrderOnScreen]+0x4c (AppKit:arm64e+0x8d5ae0)
    13 0x18ce42b64 in -[NSView _windowWillOrderOnScreen]+0xd0 (AppKit:arm64e+0x8d5b64)
    14 0x18c6e7478 in -[NSWindow _doWindowWillBeVisibleAsSheet:]+0x3c (AppKit:arm64e+0x17a478)
    15 0x18c6e5e08 in -[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:]+0x4cc (AppKit:arm64e+0x178e08)
    16 0x18c6e551c in -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]+0x80 (AppKit:arm64e+0x17851c)
    17 0x18c6e4508 in -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:]+0x140 (AppKit:arm64e+0x177508)
    18 0x18c58b710 in -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:]+0x62c (AppKit:arm64e+0x1e710)
    19 0x18c57f7fc in loadNib+0x19c (AppKit:arm64e+0x127fc)
    20 0x18c57ed2c in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:]+0x31c (AppKit:arm64e+0x11d2c)
    21 0x18c57e930 in -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:]+0xd8 (AppKit:arm64e+0x11930)
    22 0x18c57e700 in +[NSBundle(NSNibLoading) loadNibNamed:owner:]+0x180 (AppKit:arm64e+0x11700)
    23 0x18c5704cc in NSApplicationMain+0x23c (AppKit:arm64e+0x34cc)
    24 0x10453f668 in main AppDelegate.swift:5
    25 0x104715088 in start+0x204 (dyld:arm64e+0x5088)

==62855==ABORTING
Process exit with SIGABRT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants