Opened 5 months ago

Last modified 5 months ago

#8549 new bug

GHCI incorrectly link symbols defined with foreign import ccall

Reported by: qnikst Owned by:
Priority: normal Milestone:
Component: GHCi Version: 7.6.3
Keywords: Cc: hvr
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: GHCi crash Difficulty: Unknown
Test Case: https://gist.github.com/qnikst/324a66914b3aba878be5 Blocked By:
Blocking: Related Tickets:

Description

I have a problem that ghci when loads modules that uses external symbols incorrectly links them, the problem is not reproducible if I'm compiling executable or load modules with :load command.

As a result every Pointer value is equivalent to constant 0x0000fffffff225ff.

A minimal example is in attached link, it contains a small package and description how to reproduce a bug.

Problem is also reproduces on the ghc-HEAD.

Attachments (1)

test-case.tar (20.0 KB) - added by qnikst 5 months ago.
project with example of the problem

Download all attachments as: .zip

Change History (5)

comment:1 follow-up: Changed 5 months ago by hvr

I assume this is on Linux/x86_64?

comment:2 in reply to: ↑ 1 Changed 5 months ago by qnikst

Replying to hvr:

I assume this is on Linux/x86_64?

Yes.

I've tested it on Linux/x86 before and it also failed, I'll update information as soon as I'll be able to run it on that box again.

comment:3 Changed 5 months ago by carter

theres no attachement on this ticket.

Changed 5 months ago by qnikst

project with example of the problem

comment:4 Changed 5 months ago by qnikst

  • Operating System changed from Unknown/Multiple to Linux
Note: See TracTickets for help on using tickets.