Project

General

Profile

« Previous | Next » 

Revision eac3dee9

Added by byroot (Jean Boussier) over 1 year ago

test_uplus_minus: Use a different string literal

This test fail relatively frequently and it's unclear what is
happening.

str: {"address":"0x7fbdeb26d4e0", "type":"STRING", "shape_id":1, "slot_size":40, "class":"0x7fbdd1e0ec50", "frozen":true, "embedded":true, "fstring":true, "bytesize":3, "value":"bar", "encoding":"UTF-8", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true, "old":true, "uncollectible":true, "marked":true}} bar: {"address":"0x7fbdd0a8b138", "type":"STRING", "shape_id":1, "slot_size":40, "class":"0x7fbdd1e0ec50", "frozen":true, "embedded":true, "fstring":true, "bytesize":3, "value":"bar", "encoding":"UTF-8", "coderange":"7bit", "memsize":40, "flags":{"wb_protected":true}} 

The "bar".freeze literal correctly put an old-gen fstring on the stack.
But -%w(b a r).join('') returns a young-gen fstring, which suggest it
somehow failed to find the old one in the frozen_strings table.

This could be caused by another test corrupting the table, or corrupting
the "bar" fstring.

By using a different literal value we can learn whether the bug is specific
to "bar" (used in many tests) or more general.