Skip to content

node::Debug does not understand %x #32370

@gabrielschulhof

Description

@gabrielschulhof
Debug(&per_process::enabled_debug_list, DebugCategory::SOMETHING, "Message: %d\n", 25);

works fine, whereas

Debug(&per_process::enabled_debug_list, DebugCategory::SOMETHING, "Message: %x\n", 25);

dies with

#0  0x00007ffff7a9be35 in raise () from /lib64/libc.so.6
#1  0x00007ffff7a86895 in abort () from /lib64/libc.so.6
#2  0x0000000000ed39e5 in node::Abort () at ../src/node_errors.cc:239
#3  0x0000000000ed3a87 in node::Assert (info=...) at ../src/node_errors.cc:254
#4  0x0000000000f3351d in node::SPrintFImpl<int> (format=0x2c741f7 "x\n", arg=@0x7fffffffda2c: 25) at ../src/debug_utils-inl.h:49
#5  0x0000000000f3367a in node::SPrintFImpl<int> (format=0x2c741df "Hugepages info: start: %x\n", arg=@0x7fffffffda2c: 25) at ../src/debug_utils-inl.h:62
#6  0x0000000000f2feca in node::SPrintF<int> (format=0x2c741df "Hugepages info: start: %x\n", args#0=@0x7fffffffda2c: 25) at ../src/debug_utils-inl.h:86
#7  0x0000000000f2e525 in node::FPrintF<int> (file=0x7ffff7c255e0 <_IO_2_1_stderr_>, format=0x2c741df "Hugepages info: start: %x\n", args#0=@0x7fffffffda2c: 25)
    at ../src/debug_utils-inl.h:91
#8  0x0000000001020745 in node::Debug<int> (format=0x2c741df "Hugepages info: start: %x\n", cat=node::DebugCategory::LARGE_PAGES, list=0x5593de0 <node::per_process::enabled_debug_list>)
    at ../src/debug_utils-inl.h:100

My master is at 25cb855.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++Issues and PRs that require attention from people who are familiar with C++.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions