unsuitable001 / dart_cronet_sample

[SELECTED] Sample project for GSoC '21 - Cronet based HTTP package
https://github.com/google/cronet.dart
MIT License
2 stars 1 forks source link

Enable multiple instance of engine #16

Closed unsuitable001 closed 3 years ago

unsuitable001 commented 3 years ago

Enable multiple instance of engine in a same program.

unsuitable001 commented 3 years ago

There's a bug that can be reproduced by creating a HttpClient and closing it immediately.

final client2 = HttpClient();
client2.close();

It crashes with a segfault.

Engine Destroy
Engine Destroy
Unload Cronet

===== CRASH =====
si_signo=Segmentation fault(11), si_code=1, si_addr=0x7efd16e521f0
version=2.12.2 (stable) (Unknown timestamp) on "linux_x64"
pid=22372, thread=22380, isolate_group=(nil)((nil)), isolate=(nil)((nil))
isolate_instructions=0, vm_instructions=55ec32f2c020
Stack dump aborted because GetAndValidateThreadStackBounds failed.
Aborted (core dumped