Ticket #1692 (reopened bug)

Opened 12 years ago

Last modified 12 years ago

postgres libraries don't work from foreign HLLs

Reported by: moritz Owned by:
Priority: normal Milestone:
Component: library Version: 2.5.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

This works without error:

.sub main :main
    load_bytecode 'Pg.pir'
    $P0 = new 'Pg'
    $P1 = $P0.'connectdb'('')
.end

But this dies:

.HLL 'foo'
.sub main :main
    load_bytecode 'Pg.pir'
    $P0 = new 'Pg'
    $P1 = $P0.'connectdb'('')
.end

Error:

Null PMC access in invoke()
current instr.: 'foo;Pg;Conn;status' pc 137 (/home/moritz/rakudo/parrot_install/lib/2.5.0-devel/library/Pg.pir:150)
called from Sub 'foo;Pg;connectdb' pc 55 (/home/moritz/rakudo/parrot_install/lib/2.5.0-devel/library/Pg.pir:86)
called from Sub 'main' pc 12 (foo.pir:5)

Either Pg should be in the 'parrot' HLL, and needs explicit calling, or it should work anywhere it is included.

Change History

Changed 12 years ago by moritz

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

Fixed in r47900. Now needs a brave soul to write tests for it...

Changed 12 years ago by moritz

  • status changed from closed to reopened
  • resolution fixed deleted

reopening on bacek++'s request, since we don't have a test for it yet.

Changed 12 years ago by NotFound

This is a symptom of a more general problem, see TT #1694

Note: See TracTickets for help on using tickets.