Opened 4 years ago

Last modified 2 years ago

#1615 new defect

hidden/gensymed variables are registered for export

Reported by: sjamaan Owned by: sjamaan
Priority: major Milestone: 5.4
Component: expander Version: 5.0.0
Keywords: modules, alias-global-hook Cc:
Estimated difficulty: easy

Description (last modified by sjamaan)

This might cause problems if an interned symbol with the same name is defined. Find out if this really is a problem.

Also: alias global hook strikes again ;)


(module foo (x123)

(import scheme (chicken syntax))

(define-syntax define-x123
     (lambda (e i c)
       (let ((name (gensym 'x)))
         `(define ,name 'blah))))

(define x123 5)

(define-x123) ;; Should not overwrite the interned version of x123, which happens if both collide on foo#x123!

(import foo)
(print x123) ;; Should print 5, not blah

Of course this requires some fiddling to get the numbers right, which would differ per CHICKEN version (a proper test would require reading the gensym counter to force the collision, or something like that).

Change History (5)

comment:1 Changed 4 years ago by sjamaan

Note: If this is fixed we should be able to remove the ##sys#register-export in ##core#define-foreign-type

comment:2 Changed 4 years ago by sjamaan

Description: modified (diff)

comment:3 Changed 4 years ago by sjamaan

Description: modified (diff)

comment:4 Changed 4 years ago by felix winkelmann

Milestone: 5.25.3

comment:5 Changed 2 years ago by sjamaan

Milestone: 5.35.4
Note: See TracTickets for help on using tickets.