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

Deno panic while using Object.prototype.set and Deno.Command together #27720

Open
kevgeoleo opened this issue Jan 18, 2025 · 1 comment
Open
Labels
windows Related to Windows platform

Comments

@kevgeoleo
Copy link

Version: Deno 2.1.5

Hello,
I want to report a Deno panic caused by using Object.prototype.set and Deno.Command together. It can reproduced by running the following code snippet:

var data = "data";

Object.prototype.set = function (value) {
  data = value;
};

(async function () {
  let cmd = new Deno.Command("pwd");
  let { code, stdout, stderr } = await cmd.output();
})();

Deno output:

Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: windows x86_64
Version: 2.1.5
Args: ["C:\\Users\\.deno\\bin\\deno.exe", "run", ".\\panic.js"]

thread 'main' panicked at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\deno_core-0.330.0\error.rs:305:7:
Custom error class must have a builder registered: Uncaught TypeError: Invalid property descriptor. Cannot both specify accessors and a value or writable attribute, #<Object>
stack backtrace:
   0:     0x7ff668296d25 - node_api_get_module_file_name
   1:     0x7ff666c53bd9 - uv_mutex_destroy
   2:     0x7ff6682723d7 - node_api_get_module_file_name
   3:     0x7ff66829a5e1 - node_api_get_module_file_name
   4:     0x7ff66829a14d - node_api_get_module_file_name
   5:     0x7ff666acd19f - uv_mutex_destroy
   6:     0x7ff66829b10b - node_api_get_module_file_name
   7:     0x7ff66829afb6 - node_api_get_module_file_name
   8:     0x7ff66829af0f - node_api_get_module_file_name
   9:     0x7ff66829aef6 - node_api_get_module_file_name
  10:     0x7ff669d8caa4 - CrashForExceptionInNonABICompliantCodeRange
  11:     0x7ff669d91c67 - CrashForExceptionInNonABICompliantCodeRange
  12:     0x7ff666de2591 - uv_mutex_destroy
  13:     0x7ff66780dfc7 - node_api_get_module_file_name
  14:     0x7ff66780d4b7 - node_api_get_module_file_name
  15:      0x1ed3170f686 - <unknown>
  16:      0x1ed3170d85e - <unknown>
  17:      0x1ed3170d85e - <unknown>
  18:      0x1ed3170d85e - <unknown>
  19:      0x1ed3170d85e - <unknown>
  20:      0x1ed3170d85e - <unknown>
  21:      0x1ed3175368b - <unknown>
  22:      0x1ed3170b45c - <unknown>
  23:      0x1ed3170afaf - <unknown>
  24:     0x7ff6687b5208 - node_api_get_module_file_name
  25:     0x7ff6687b5de5 - node_api_get_module_file_name
  26:     0x7ff6687b5f43 - node_api_get_module_file_name
  27:     0x7ff6687bda41 - node_api_get_module_file_name
  28:     0x7ff6687bd190 - node_api_get_module_file_name
  29:     0x7ff6687bcb0f - node_api_get_module_file_name
  30:     0x7ff6687b699c - node_api_get_module_file_name
  31:     0x7ff66863d3ad - node_api_get_module_file_name
  32:     0x7ff668629080 - node_api_get_module_file_name
  33:     0x7ff666eb7c90 - uv_mutex_destroy
  34:     0x7ff666192ab3 - uv_mutex_destroy
  35:     0x7ff666a9eb3c - uv_mutex_destroy
  36:     0x7ff666a9cbae - uv_mutex_destroy
  37:     0x7ff666a3618c - uv_mutex_destroy
  38:     0x7ff666ac87fc - uv_mutex_destroy
  39:     0x7ff6662ed16b - uv_mutex_destroy
  40:     0x7ff666b77fa5 - uv_mutex_destroy
  41:     0x7ff666499528 - uv_mutex_destroy
  42:     0x7ff666acf421 - uv_mutex_destroy
  43:     0x7ff6662c0cc6 - uv_mutex_destroy
  44:     0x7ff666b78087 - uv_mutex_destroy
  45:     0x7ff669d2753c - CrashForExceptionInNonABICompliantCodeRange
  46:     0x7ff9a9abe8d7 - BaseThreadInitThunk
  47:     0x7ff9aa41fbcc - RtlUserThreadStart

Platform:

Microsoft Windows NT 10.0.26100.0 x64

@marvinhagemeister marvinhagemeister added the windows Related to Windows platform label Jan 20, 2025
@marvinhagemeister
Copy link
Contributor

Can reproduce the issue on windows, but not on macOS. Marking as window-only issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Related to Windows platform
Projects
None yet
Development

No branches or pull requests

2 participants