rusty_v8/tests
Aapo Alasuutari 7b6451aed4
fix: ExternalOneByteStringResource is not guaranteed to be valid UTF-8 (#1532)
A subtle unsoundness / undefined behaviour made its way into the fairly recently added ExternalOneByteStringResource object: The as_str API is not sound as the data inside may be be Latin-1, not ASCII.

As the API was not used anywhere in deno or deno_core, I opted to simply remove it and replace it with an as_bytes API. I also modified the test to showcase the Latin-1 string case and added copious notes and explanations around the code to make sure this doesn't accidentally happen again. The likely reason why the API originally slipped in is because the OneByteConst has this API where it is safe because the OneByteConst creation checks the data for ASCII-ness.

I also tried to add an API to extract an Option<&'static OneByteConst> from an &ExternalOneByteStringResource but run into rust-lang/rust#119618 ie. OneByteConst is actually duplicating the vtables... which is not great.
2024-07-21 01:09:30 +02:00
..
compile_fail rust 1.79.0 (#1527) 2024-07-12 09:30:31 -07:00
slots.rs fix: remove use of deprecated apis (#1488) 2024-06-27 08:29:46 -07:00
test_api_entropy_source.rs fix: crash on x86_64 systems that support memory protection keys (#1318) 2023-09-12 23:26:42 +00:00
test_api_flags.rs fix: crash on x86_64 systems that support memory protection keys (#1318) 2023-09-12 23:26:42 +00:00
test_api.rs fix: ExternalOneByteStringResource is not guaranteed to be valid UTF-8 (#1532) 2024-07-21 01:09:30 +02:00
test_concurrent_isolate_creation_and_disposal.rs Upgrade V8 to 10.3.174.3 (#969) 2022-05-18 10:53:34 +02:00
test_cppgc.rs feat: cppgc::Ptr (#1523) 2024-07-10 22:03:49 -07:00
test_platform_atomics_pump_message_loop.rs fix: crash on x86_64 systems that support memory protection keys (#1318) 2023-09-12 23:26:42 +00:00
test_single_threaded_default_platform.rs Rolling to V8 10.0.139.6 (#915) 2022-03-09 14:41:46 +01:00
test_ui.rs chore: Allow Rust ASAN flags to propagate into v8 build (#1449) 2024-04-12 15:26:06 -06:00