Skip to content

Segmentation fault.: console.log(dayjs(1749820051142).format()); #5429

Description

@zaaack

What happened

14419 Segmentation fault (core dumped) ./ts-test.native## What you expected

print date

Minimal reproduction

import dayjs from 'dayjs'

console.log(dayjs(1749820051142).format());
console.log('dayjs2', dayjs().hour(6).minute(0).second(0).add(-5, 'm')) // this cause segment fault, too

Command you ran:

# e.g. perry compile main.ts -o app --target ios-simulator

PERRY_ALLOW_UNIMPLEMENTED=1 perry compile test.ts -o ts-test.native --debug-symbols 2>&1; ./ts-test.native

Environment

  • Perry version: 0.5.1180
  • Host OS: Windows 11 wsl2 ubuntu24.04
  • Target: native
  • Rust toolchain (if building from source):
  • Installed via:

Diagnostic output

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000841569 in js_typed_feedback_object_get_field_by_name_f64 ()
(gdb)
(gdb) bt
#0 0x0000000000841569 in js_typed_feedback_object_get_field_by_name_f64 ()
#1 0x0000000000457bc8 in perry_closure_node_modules.pnpm_dayjs_1_11_21_node_modules_dayjs_dayjs_min_js ()
#2 0x0000000000458319 in perry_closure_node_modules.pnpm_dayjs_1_11_21_node_modules_dayjs_dayjs_min_js ()
#3 0x00000000006abaaf in perry_runtime::closure::registry::dispatch_rest_bundled ()
#4 0x000000000079623a in js_closure_call1 ()
#5 0x0000000000476f7e in main ()

Anything else

workarounds:

console.log(dayjs(new Date(1749820051142)).format());

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed defect or regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions