Skip to content

Conversation

@lewing
Copy link
Member

@lewing lewing commented Oct 30, 2025

No description provided.

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 30, 2025
@lewing lewing changed the title Make sure we treat tread the ptr as unsigned Make sure we treat the ptrs as unsigned Oct 30, 2025
@lewing lewing added area-System.Runtime.InteropServices.JavaScript and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 30, 2025
@pavelsavara
Copy link
Member

Please add http test to AllocateLargeHeapThenRepeatedlyInterop WBT

See src\mono\wasm\Wasm.Build.Tests\MemoryTests.cs and src\mono\wasm\testassets\WasmBasicTestApp\App\MemoryTest.cs

@pavelsavara
Copy link
Member

getU8 is probably also wrong when called from mono_wasm_bind_cs_function-> get_signature_type

mono_assert(bufferLength > 0, "expected bufferLength > 0");
// the bufferPtr is pinned by the caller
const view = new Span(bufferPtr, bufferLength, MemoryViewType.Byte);
const view = new Span(<any>((bufferPtr as any) >>> 0), bufferLength, MemoryViewType.Byte);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rather do the conversion in _unsafe_create_view ?

@pavelsavara
Copy link
Member

  • ws_wasm_send is wrong about buffer_ptr
  • web_socket_receive_buffering with buffer_ptr
  • SystemJS_RandomBytes is wrong with bufferPtr
  • mono_wasm_fire_debugger_agent_message_with_data and mono_wasm_add_dbg_command_received is wrong with data
  • mono_wasm_load_bytes_into_heap and mono_wasm_load_bytes_into_heap_persistent is probably wrong with memoryOffset
  • mono_wasm_asm_loaded is probably wrong
  • diagnosticHelpers.ds_rt_websocket_send is probably wrong
  • viewOrCopy in strings.ts is probably wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants