Hi all,

I accidentally triggered what appears to be an internal error message
from the macro expander (to do with syntax taints).

Unfortunately, I have no idea how to come up with a narrow test case
since it happens due to changing Typed Racket's `struct:` expansion.
I've attached a short patch below that shows what's needed to trigger it
though.

Here's the interaction I get with the patch applied:
  $ racket -I typed/racket
  Welcome to Racket v5.3.900.1.
  -> (struct: Foo ([x : Integer]))
  ; internal error: cannot copy taint armings from tainted source [,bt for
  ;   context]

Any ideas on how I can get a better test case?

Cheers,
Asumu
>From 4abd6636420c0425b77015ca5a00ecb73230f3c7 Mon Sep 17 00:00:00 2001
From: Asumu Takikawa <as...@ccs.neu.edu>
Date: Tue, 25 Jun 2013 10:03:02 -0400
Subject: [PATCH] Patch that triggers internal taint error

---
 .../typed-racket-lib/typed-racket/base-env/prims.rkt              |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt
index 548bfe4..d3a8b53 100644
--- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt
+++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt
@@ -593,7 +593,10 @@ This file defines two sorts of primitives. All of them are provided into any mod
                                        nm.old-spec (fs ...)
                                        #:maker #,cname
                                        #,@mutable?))])
-            #'(begin d-s dtsi)))]))))
+            (if (eq? (syntax-local-context) 'top-level)
+                #'(begin (module a typed/racket d-s dtsi)
+                         (eval '(require 'a)))
+                #'(begin d-s dtsi))))]))))
 
 
 ;Copied from racket/private/define-struct
-- 
1.7.10.4

_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Reply via email to