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

Removing unmanaged APIs #26

Closed
50 tasks done
bwikbs opened this issue Jan 18, 2021 · 19 comments
Closed
50 tasks done

Removing unmanaged APIs #26

bwikbs opened this issue Jan 18, 2021 · 19 comments

Comments

@bwikbs
Copy link
Member

bwikbs commented Jan 18, 2021

Problem

Unmanaged APIs should not be used for app store registration.
(This issue is also related to flutter-tizen/flutter-tizen#10. because wayland related functions are also unmanaged APIs)

refer to :

gear_core_allowlist.txt (List of APIs rejected by store)

  • eglBindAPI[libflutter.so]
  • eglCreateContext[libflutter.so]
  • eglDestroyContext[libflutter.so]
  • eglCreateWindowSurface[libflutter.so]
  • eglDestroySurface[libflutter.so]
  • eglTerminate[libflutter.so]
  • eglMakeCurrent[libflutter.so]
  • eglSwapBuffers[libflutter.so]
  • eglCreatePbufferSurface[libflutter.so]
  • eglGetCurrentDisplay[libflutter.so]
  • eglQueryString[libflutter.so]
  • eglChooseConfig[libflutter.so]
  • eglGetError[libflutter.so]
  • eglInitialize[libflutter.so]
  • eglGetProcAddress[libflutter.so]
  • eglGetDisplay[libflutter.so]
  • ecore_wl2_window_geometry_get[libflutter.so]
  • ecore_wl2_window_show[libflutter.so]
  • ecore_wl2_egl_window_resize_with_rotation[libflutter.so]
  • ecore_wl2_sync[libflutter.so]
  • ecore_wl2_window_free[libflutter.so]
  • ecore_wl2_display_connect[libflutter.so]
  • ecore_wl2_egl_window_native_get[libflutter.so]
  • ecore_wl2_egl_window_create[libflutter.so]
  • ecore_wl2_window_new[libflutter.so]
  • ecore_wl2_window_type_set[libflutter.so]
  • ecore_wl2_display_disconnect[libflutter.so]
  • ecore_wl2_egl_window_destroy[libflutter.so]
  • ecore_wl2_init[libflutter.so]
  • ecore_wl2_display_get[libflutter.so]
  • ecore_wl2_window_alpha_set[libflutter.so]
  • ecore_wl2_window_id_get[libflutter.so]
  • ecore_wl2_shutdown[libflutter.so]
  • ecore_wl2_window_aux_hint_add[libflutter.so]
  • ecore_device_name_get[libflutter.so]
  • ecore_device_class_get[libflutter.so]
  • ecore_device_subclass_get[libflutter.so]
  • tdm_client_vblank_destroy[libflutter.so]
  • tdm_client_handle_events[libflutter.so]
  • tdm_client_get_output[libflutter.so]
  • tdm_client_create[libflutter.so]
  • tdm_client_destroy[libflutter.so]
  • tdm_client_vblank_set_enable_fake[libflutter.so]
  • tdm_client_output_create_vblank[libflutter.so]
  • tdm_client_vblank_wait[libflutter.so]
  • tbm_surface_internal_is_valid[libflutter.so]
  • tbm_surface_internal_unref[libflutter.so]
  • tbm_surface_internal_ref[libflutter.so]
  • _ZTHN4dart8OSThread18current_vm_thread_E[libflutter.so]
  • __dlog_print[libflutter.so]
@bwikbs
Copy link
Member Author

bwikbs commented Jan 18, 2021

AFAIK, Here are some things we can do for this:

  1. Use EvasGL
  2. Use SDL
  3. Use bypass methods like dlopen (I'm not sure if it fits all cases..but I know of some cases that worked)

@bwikbs
Copy link
Member Author

bwikbs commented Jan 19, 2021

For the last few days, I have been working on a POC using EvasGL, and I succeeded in partially drawing the like following.(only TM1, TW3 still has skia initialization problems. )
dump_screen (1)
However, the screen update didn't work properly, and I found out that this is a problem with evas_object_image_pixels_get_callback_set API.
The action drawing in EvasGL should only happen in a specific callback in the main thread, and this doesn't fit our situation.
To do this, we will have to draw the texture in our rendering thread and draw it back in the main thread.
This will take unnecessary complex steps and consume a lot of extra resources than now and raise the question of why we should use EvasGL.

@bwikbs
Copy link
Member Author

bwikbs commented Jan 19, 2021

I am wondering if the dlopen method is our right direction for this issue. That's not a nice way, but it seems that we can solve this problem by a reasonable cost.

@xuelian-bai
Copy link

First, I think the best way to solve this issue is to filter these APIs for flutter.so, Flutter should use low level APIs instead of wrapped APIs.
Second, dlopen only work for shared library, and it takes time to load shared library, performance may be affected.

@bbrto21
Copy link

bbrto21 commented Jan 19, 2021

To do this, we will have to draw the texture in our rendering thread and draw it back in the main thread.

Flutter allows you to use the main thread as the render thread. If there is no big problem with rendering performance, maybe this is a good solution.

@bwikbs
Copy link
Member Author

bwikbs commented Jan 19, 2021

Flutter allows you to use the main thread as the render thread. If there is no big problem with rendering performance, maybe this is a good solution.

Plz, Let me know how

@bwikbs
Copy link
Member Author

bwikbs commented Jan 19, 2021

First, I think the best way to solve this issue is to filter these APIs for flutter.so, Flutter should use low level APIs instead of wrapped APIs.

Please explain in more detail. I don't know what you intend to do yet...

Second, dlopen only work for shared library, and it takes time to load shared library, performance may be affected.

Hm.. I'm not sure what you mean. Is there anything we use other than shared? Didn't we have to use it anyway?

@bbrto21
Copy link

bbrto21 commented Jan 19, 2021

Please refer to the two below
https://github.com/flutter/flutter/wiki/The-Engine-architecture#threading

typedef struct {
  /// The size of this struct. Must be sizeof(FlutterCustomTaskRunners).
  size_t struct_size;
  /// Specify the task runner for the thread on which the `FlutterEngineRun`
  /// call is made. The same task runner description can be specified for both
  /// the render and platform task runners. This makes the Flutter engine use
  /// the same thread for both task runners.
  const FlutterTaskRunnerDescription* platform_task_runner;
  /// Specify the task runner for the thread on which the render tasks will be
  /// run. The same task runner description can be specified for both the render
  /// and platform task runners. This makes the Flutter engine use the same
  /// thread for both task runners.
  const FlutterTaskRunnerDescription* render_task_runner;
} FlutterCustomTaskRunners;

@bwikbs
Copy link
Member Author

bwikbs commented Jan 19, 2021

The action drawing in EvasGL should only happen in a specific callback in the main thread,

@bbrto21 Your suggestion solved the main thread part, but not the specific callback part.
Anyway, I'll try it and share the result. (Maybe it will work properly...)

@xuelian-bai
Copy link

xuelian-bai commented Jan 19, 2021

First, I think the best way to solve this issue is to filter these APIs for flutter.so, Flutter should use low level APIs instead of wrapped APIs.

Please explain in more detail. I don't know what you intend to do yet...

I mean it's no problem to use these APIs theoretically, because it's more suitable for Flutter to use low level APIs, or why not everyone use SDL? By using lower level APIs can give flutter engine more flexibility.
So, I think Galaxy Store should modify its policy to allow flutter.so to use those APIs.

Second, dlopen only work for shared library, and it takes time to load shared library, performance may be affected.

Hm.. I'm not sure what you mean. Is there anything we use other than shared? Didn't we have to use it anyway?

I mean you can only get function name from shared library by dlsym. I'm not sure if following APIs could be got by dlsym
_ZTHN4dart8OSThread18current_vm_thread_E[libflutter.so]
__dlog_print[libflutter.so]
Even you get there function pointer, you will still have to include their header files, is that allowed by Galaxy Store?

@bwikbs
Copy link
Member Author

bwikbs commented Jan 19, 2021

I mean it's no problem to use these APIs theoretically, because it's more suitable for Flutter to use low level APIs, or why not everyone use SDL? By using lower level APIs can give flutter engine more flexibility.
So, I think Galaxy Store should modify its policy to allow flutter.so to use those APIs.

Ah... I understand what you mean. I totally agree with you... but I'm not sure.. (maybe it's possible... 😄 who knows..)

I mean you can only get function name from shared library by dlsym. I'm not sure if following APIs could be got by dlsym
_ZTHN4dart8OSThread18current_vm_thread_E[libflutter.so]
__dlog_print[libflutter.so]
Even you get there function pointer, you will still have to include their header files, is that allowed by Galaxy Store?

I tried to see why these things come out... I don't understand well...

@bwikbs
Copy link
Member Author

bwikbs commented Jan 19, 2021

After applying the boram's suggestion, it seems to work. I don't feel any deterioration in performance.
I think EvasGL could be one of our options again.
result

@bwikbs
Copy link
Member Author

bwikbs commented Jan 19, 2021

I tried to see why these things come out... I don't understand well...

This is the result of investigation regarding above issue.
First of all I can find following symbol in our so.

 26: 00000000     0 FUNC    GLOBAL DEFAULT  UND __dlog_print
 80: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _ZTHN4dart8OSThread18curr

And I also find this symbol dart::OSThread::current_vm_thread_ in our source code. (Yes. This is symbol we have... ❗)

third_party/dart/runtime/vm/os_thread.cc:24:thread_local ThreadState* OSThread::current_vm_thread_ = NULL;

It seems that the store search undefined dynamic symbols which is not belong to white list In my guess.
So I think you can make those symbols undetected by tweaking the compilation. (Of course, a little trial and error is required.)

@xuelian-bai
Copy link

__dlog_print can be solved, since dlog is allowed, we may called the wrong function
https://docs.tizen.org/application/native/api/wearable/4.0/group__CAPI__SYSTEM__DLOG.html

@bwikbs
Copy link
Member Author

bwikbs commented Jan 19, 2021

Cool. Now we only figure out how dart::OSThread::current_vm_thread_ is binded our so file.

@bwikbs
Copy link
Member Author

bwikbs commented Jan 20, 2021

symbol TLS init function for dart::OSThread::current_vm_thread_ is associated with following code
third_party/dart/runtime/vm/os_thread.h

// On iOS, thread_local requires iOS 9+.
#if !HOST_OS_IOS
#define HAS_C11_THREAD_LOCAL 1
#endif
...
#if defined(HAS_C11_THREAD_LOCAL)
  static thread_local ThreadState* current_vm_thread_;
#endif

And I'm not sure how to elegantly solve it without touching third_party/dart.

@xuelian-bai
Copy link

symbol TLS init function for dart::OSThread::current_vm_thread_ is associated with following code
third_party/dart/runtime/vm/os_thread.h

// On iOS, thread_local requires iOS 9+.
#if !HOST_OS_IOS
#define HAS_C11_THREAD_LOCAL 1
#endif
...
#if defined(HAS_C11_THREAD_LOCAL)
  static thread_local ThreadState* current_vm_thread_;
#endif

And I'm not sure how to elegantly solve it without touching third_party/dart.

Actually I don't understand why this warning happen? because thread_local is undefined?

@bwikbs
Copy link
Member Author

bwikbs commented Jan 20, 2021

Well, in my opinion, the store simply detects external symbols that are not on the whitelist. and gcc generate a special symbol for the TLS variable, which seems to be detected by store.
So.. we should not use TLS for avoiding this situation.
Fortunately, not using TLS does not cause any problems with the current engine, so I want to turn it off if possible.

@bwikbs
Copy link
Member Author

bwikbs commented Jan 21, 2021

I heard that the store will change policies for us.
So I think we don't need to proceed with this work anymore at this moment
I will open it again later if necessary.

@bwikbs bwikbs closed this as completed Jan 21, 2021
JSUYA pushed a commit to JSUYA/engine that referenced this issue Aug 23, 2024
The culprit test asks different threads to access some stack variables, but the stack might return earlier than the threads' completion. This PR fixes it by adding latches.

This test, despite being possibly fine for now, consistently triggers the following asan error when I make some unrelated trivial changes.

The thrown error:
<details>
<pre>
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from EmbedderTest
[ RUN      ] EmbedderTest.EmbedderThreadHostUseCustomThreadConfig
=================================================================
==14398==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00031833b530 at pc 0x00013248d543 bp 0x000318740390 sp 0x00031873fb58
WRITE of size 4 at 0x00031833b530 thread T2
    #0 0x13248d542 in pthread_getschedparam+0x3d2 (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x2c542)
    flutter-tizen#1 0x100577671 in flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0::operator()() const+0x1a1 (embedder_unittests:x86_64+0x10030b671)
    flutter-tizen#2 0x1005774a2 in decltype(std::declval<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&>()()) std::_fl::__invoke[abi:v15000]<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&>(flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&)+0x22 (embedder_unittests:x86_64+0x10030b4a2)
    flutter-tizen#3 0x100577402 in void std::_fl::__invoke_void_return_wrapper<void, true>::__call<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&>(flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0&)+0x22 (embedder_unittests:x86_64+0x10030b402)
    flutter-tizen#4 0x1005773ba in std::_fl::__function::__alloc_func<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0, std::_fl::allocator<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0>, void ()>::operator()[abi:v15000]()+0x2a (embedder_unittests:x86_64+0x10030b3ba)
    flutter-tizen#5 0x1005734f6 in std::_fl::__function::__func<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0, std::_fl::allocator<flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()::$_0>, void ()>::operator()()+0x26 (embedder_unittests:x86_64+0x1003074f6)
    flutter-tizen#6 0x10066a525 in std::_fl::__function::__value_func<void ()>::operator()[abi:v15000]() const+0x105 (embedder_unittests:x86_64+0x1003fe525)
    flutter-tizen#7 0x10066a3f2 in std::_fl::function<void ()>::operator()() const+0x22 (embedder_unittests:x86_64+0x1003fe3f2)
    flutter-tizen#8 0x100c229dc in fml::MessageLoopImpl::FlushTasks(fml::FlushType)+0x37c (embedder_unittests:x86_64+0x1009b69dc)
    flutter-tizen#9 0x100c22577 in fml::MessageLoopImpl::RunExpiredTasksNow()+0x27 (embedder_unittests:x86_64+0x1009b6577)
    flutter-tizen#10 0x100c8aa2f in fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*)+0x2f (embedder_unittests:x86_64+0x100a1ea2f)
    flutter-tizen#11 0x7ff817b54508 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__+0x13 (CoreFoundation:x86_64+0x97508)
    flutter-tizen#12 0x7ff817b540b8 in __CFRunLoopDoTimer+0x310 (CoreFoundation:x86_64+0x970b8)
    flutter-tizen#13 0x7ff817b53ce9 in __CFRunLoopDoTimers+0x11c (CoreFoundation:x86_64+0x96ce9)
    flutter-tizen#14 0x7ff817b380ac in __CFRunLoopRun+0x83b (CoreFoundation:x86_64+0x7b0ac)
    flutter-tizen#15 0x7ff817b372a8 in CFRunLoopRunSpecific+0x22c (CoreFoundation:x86_64+0x7a2a8)
    flutter-tizen#16 0x100c8b155 in fml::MessageLoopDarwin::Run()+0x305 (embedder_unittests:x86_64+0x100a1f155)
    flutter-tizen#17 0x100c223d0 in fml::MessageLoopImpl::DoRun()+0x150 (embedder_unittests:x86_64+0x1009b63d0)
    flutter-tizen#18 0x100c1f1fa in fml::MessageLoop::Run()+0x2a (embedder_unittests:x86_64+0x1009b31fa)
    flutter-tizen#19 0x100c7baa4 in fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0::operator()() const+0x194 (embedder_unittests:x86_64+0x100a0faa4)
    flutter-tizen#20 0x100c7b8e2 in decltype(std::declval<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&>()()) std::_fl::__invoke[abi:v15000]<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&>(fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&)+0x22 (embedder_unittests:x86_64+0x100a0f8e2)
    flutter-tizen#21 0x100c7b842 in void std::_fl::__invoke_void_return_wrapper<void, true>::__call<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&>(fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&)+0x22 (embedder_unittests:x86_64+0x100a0f842)
    flutter-tizen#22 0x100c7b7fa in std::_fl::__function::__alloc_func<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::_fl::allocator<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()[abi:v15000]()+0x2a (embedder_unittests:x86_64+0x100a0f7fa)
    flutter-tizen#23 0x100c77ad6 in std::_fl::__function::__func<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::_fl::allocator<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()()+0x26 (embedder_unittests:x86_64+0x100a0bad6)
    flutter-tizen#24 0x10066a525 in std::_fl::__function::__value_func<void ()>::operator()[abi:v15000]() const+0x105 (embedder_unittests:x86_64+0x1003fe525)
    flutter-tizen#25 0x10066a3f2 in std::_fl::function<void ()>::operator()() const+0x22 (embedder_unittests:x86_64+0x1003fe3f2)
    flutter-tizen#26 0x100c75388 in fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)::$_0::operator()(void*) const+0xe8 (embedder_unittests:x86_64+0x100a09388)
    flutter-tizen#27 0x100c75227 in fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)::$_0::__invoke(void*)+0xc7 (embedder_unittests:x86_64+0x100a09227)
    flutter-tizen#28 0x1324b3e76 in asan_thread_start(void*)+0x46 (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x52e76)
    flutter-tizen#29 0x7ff817a5c18a in _pthread_start+0x62 (libsystem_pthread.dylib:x86_64+0x618a)
    flutter-tizen#30 0x7ff817a57ae2 in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x1ae2)

Address 0x00031833b530 is located in stack of thread T0 at offset 144 in frame
    #0 0x1002d051f in flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()+0xf (embedder_unittests:x86_64+0x10006451f)

  This frame has 12 object(s):
    [32, 40) 'thread_host' (line 3445)
    [64, 112) 'ref.tmp' (line 3446)
    [144, 148) 'ui_policy' (line 3449) <== Memory access at offset 144 is inside this variable
    [160, 168) 'ui_param' (line 3450)
    [192, 200) 'ref.tmp2' (line 3452)
    [224, 272) 'ref.tmp5' (line 3452)
    [304, 320) 'agg.tmp'
    [336, 340) 'io_policy' (line 3458)
    [352, 360) 'io_param' (line 3459)
    [384, 392) 'ref.tmp6' (line 3460)
    [416, 464) 'ref.tmp10' (line 3460)
    [496, 512) 'agg.tmp11'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-use-after-scope (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x2c542) in pthread_getschedparam+0x3d2
Shadow bytes around the buggy address:
  0x00031833b280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b480: 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 f8 f8 f8 f8
=>0x00031833b500: f8 f8 f2 f2 f2 f2[f8]f2 f8 f2 f2 f2 f8 f2 f2 f2
  0x00031833b580: f8 f8 f8 f8 f8 f8 f2 f2 f2 f2 00 00 f2 f2 f8 f2
  0x00031833b600: f8 f2 f2 f2 f8 f2 f2 f2 f8 f8 f8 f8 f8 f8 f2 f2
  0x00031833b680: f2 f2 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00
  0x00031833b700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x00031833b780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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 T2 created by T0 here:
    #0 0x1324ae92d in pthread_create+0x5d (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x4d92d)
    flutter-tizen#1 0x100c73901 in fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)+0x401 (embedder_unittests:x86_64+0x100a07901)
    flutter-tizen#2 0x100c73cca in fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)+0x2a (embedder_unittests:x86_64+0x100a07cca)
    flutter-tizen#3 0x100c748c9 in std::_fl::__unique_if<fml::ThreadHandle>::__unique_single std::_fl::make_unique[abi:v15000]<fml::ThreadHandle, fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>(fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0&&)+0x149 (embedder_unittests:x86_64+0x100a088c9)
    flutter-tizen#4 0x100c74335 in fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)+0x255 (embedder_unittests:x86_64+0x100a08335)
    flutter-tizen#5 0x100c746b2 in fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)+0x32 (embedder_unittests:x86_64+0x100a086b2)
    flutter-tizen#6 0x106ee0b1a in std::_fl::__unique_if<fml::Thread>::__unique_single std::_fl::make_unique[abi:v15000]<fml::Thread, std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig&>(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig&)+0x4a (embedder_unittests:x86_64+0x106c74b1a)
    flutter-tizen#7 0x106ee08e8 in flutter::ThreadHost::CreateThread(flutter::ThreadHost::Type, std::_fl::optional<fml::Thread::ThreadConfig>, flutter::ThreadHost::ThreadHostConfig const&) const+0x1b8 (embedder_unittests:x86_64+0x106c748e8)
    flutter-tizen#8 0x106ee1466 in flutter::ThreadHost::ThreadHost(flutter::ThreadHost::ThreadHostConfig const&)+0x2f6 (embedder_unittests:x86_64+0x106c75466)
    flutter-tizen#9 0x106ee19ca in flutter::ThreadHost::ThreadHost(flutter::ThreadHost::ThreadHostConfig const&)+0x2a (embedder_unittests:x86_64+0x106c759ca)
    flutter-tizen#10 0x100b6f730 in flutter::EmbedderThreadHost::CreateEngineManagedThreadHost(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&)+0x3a0 (embedder_unittests:x86_64+0x100903730)
    flutter-tizen#11 0x100b6e51c in flutter::EmbedderThreadHost::CreateEmbedderOrEngineManagedThreadHost(FlutterCustomTaskRunners const*, std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&)+0xcc (embedder_unittests:x86_64+0x10090251c)
    flutter-tizen#12 0x1002d0748 in flutter::testing::EmbedderTest_EmbedderThreadHostUseCustomThreadConfig_Test::TestBody()+0x238 (embedder_unittests:x86_64+0x100064748)
    flutter-tizen#13 0x1089ce93b in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x21b (embedder_unittests:x86_64+0x10876293b)
    flutter-tizen#14 0x108955bdf in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x2cf (embedder_unittests:x86_64+0x1086e9bdf)
    flutter-tizen#15 0x108955755 in testing::Test::Run()+0x3a5 (embedder_unittests:x86_64+0x1086e9755)
    flutter-tizen#16 0x108957b23 in testing::TestInfo::Run()+0x593 (embedder_unittests:x86_64+0x1086ebb23)
    flutter-tizen#17 0x10895a8f2 in testing::TestSuite::Run()+0x6e2 (embedder_unittests:x86_64+0x1086ee8f2)
    flutter-tizen#18 0x108977d7a in testing::internal::UnitTestImpl::RunAllTests()+0xb9a (embedder_unittests:x86_64+0x10870bd7a)
    flutter-tizen#19 0x1089ee88b in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)+0x21b (embedder_unittests:x86_64+0x10878288b)
    flutter-tizen#20 0x1089770ac in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)+0x2cc (embedder_unittests:x86_64+0x10870b0ac)
    flutter-tizen#21 0x108976c3b in testing::UnitTest::Run()+0x28b (embedder_unittests:x86_64+0x10870ac3b)
    flutter-tizen#22 0x1083e45e2 in RUN_ALL_TESTS()+0x22 (embedder_unittests:x86_64+0x1081785e2)
    flutter-tizen#23 0x1083e43c8 in main+0x6e8 (embedder_unittests:x86_64+0x1081783c8)
    flutter-tizen#24 0x213ff0365  (<unknown module>)

==14398==ABORTING
[1]    14398 abort      ../out/host_debug_unopt/embedder_unittests 
</pre>
</details>

The changes I made (isolated from a larger change, therefore it doesn't seem reasonable by itself):
```diff
 // shell/common/platform_view.cc, L33

 void PlatformView::DispatchPointerDataPacket(
     std::unique_ptr<PointerDataPacket> packet) {
-  delegate_.OnPlatformViewDispatchPointerDataPacket(
-      pointer_data_packet_converter_.Convert(std::move(packet)));
+  delegate_.OnPlatformViewDispatchPointerDataPacket(std::move(packet));
 }
```

Base engine rev: de2a73c

Environment: Macbook with M1 Max Chip, OS 14.4.1

Compiling with:
```
./engine/src/flutter/tools/gn --goma --unoptimized --asan --xcode-symlinks
./depot_tools/ninja -j200 -C ./engine/src/out/host_debug_unopt
./out/host_debug_unopt/embedder_unittests
```

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants