Home GnuPG

gpgscm: Remove framework for immediate values.

Description

gpgscm: Remove framework for immediate values.

* tests/gpgscm/scheme.c (IMMEDIATE_TAG): Remove macro.
(is_immediate): Likewise.
(set_immediate): Likewise.
(clr_immediate): Likewise.
(enum scheme_types): Set the LSB in every value.
(fill_vector): Adapt.
(vector_elem): Likewise.
(set_vector_elem): Likewise.
(mark): Likewise.
(gc): Test for the LSB to tell typeflags apart from pointers stored in
the same memory location.

Supporting immediate values would require invasive changes to the
interpreter and is likely not worth the trouble. On the other hand,
tagging pointers in vectors complicated the hash table implementation
needlessly. Therefore, I remove this again.

This fixes a crash on big endian architectures.

  • GnuPG-bug-id: T2996
  • Signed-off-by: Justus Winter <justus@g10code.com>

Details

Provenance
justusAuthored on Mar 16 2017, 4:58 PM
Parents
rE14fcdcabb25d: tests: Rework environment setup.
Branches
Unknown
Tags
Unknown
Tasks
T2996: gpgscm crashes on big endian architectures