Ticket #1193 (closed RFC: done)

Opened 5 years ago

Last modified 4 years ago

Setting PMC to NULL STRING

Reported by: NotFound Owned by:
Priority: normal Milestone:
Component: none Version: 1.7.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

Today I found a bug: this programs dies with an assertion failure in a debug build:

.sub foo
    .local string s
    .return(s)
.end

.sub main :main
    .local pmc p
    p= foo()
.end

I located the problem in the CallSignatureReturns PMC and quick fixed in r42253 by setting PMCNULL when the STRING value is NULL. However I'm not sure if this is the desired behavior, or will be better to create an HLL mapped String type.

This also remembered me a pending question: when setting a String PMC to a NULL STRING, or leave uninitialized, what is his desired value? An empty string or a NULL string?

That question is for the core String PMC, HLL can choose whatever they want for his mapped type, I suppose.

Change History

Changed 4 years ago by bacek

Hello.

Example from ticket doesn't fail anymore. Can we close this ticket?

-- Bacek

Changed 4 years ago by NotFound

  • status changed from new to closed
  • resolution set to done

Given that this was a Request For Comments and no one commented in 13 months, I guess we can close it.

Note: See TracTickets for help on using tickets.