Skip to content

gason does not work on platforms with tagged pointers (e.g. Android) #36

@jyaif

Description

@jyaif

Android is starting to use tagged pointers (https://source.android.com/devices/tech/debug/tagged-pointers)

This code breaks with tagged pointers:

ival = JSON_VALUE_NAN_MASK | ((uint64_t)tag << JSON_VALUE_TAG_SHIFT) | (uintptr_t)payload;

A real life example that occurred on a Pixel 5 is of a JsonValue created with the tag 2, and with the payload 0xb400007a779ebdc0.
Calling getTag() on that value returns 0, but it should have returned 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions