root icon indicating copy to clipboard operation
root copied to clipboard

Value printer confused about valid address

Open pcanal opened this issue 7 months ago • 3 comments

Check duplicate issues.

  • [X] Checked for duplicates

Description

On MacOS the address of the name returned by type_index for the type_info of numerical types (and void) is incorrectly tagged by the value printer as an invalid address.

Reproducer

root.exe -b -l
root [0] std::type_index(typeid(TObject)).name()
(const char *) "7TObject"
root [1] std::type_index(typeid(int)).name()
(const char *) 0x19eab659c <invalid memory address>
root [2] std::cout << (const char *) 0x19eab659c << '\n';
i

ROOT version

master.

Installation method

from sorce.

Operating system

MacOS

Additional context

No response

pcanal avatar Dec 08 '23 10:12 pcanal

Hi @vgvassilev is this hard to address?

dpiparo avatar May 01 '24 18:05 dpiparo

Looks like the bug is in the implementation of cling::utils::isAddressValid which makes a bunch of system calls iirc... I am not sure if we can do a lot here...

vgvassilev avatar May 01 '24 18:05 vgvassilev

Maybe @hahnjo knows how to make this work...

vgvassilev avatar May 01 '24 18:05 vgvassilev