From 1005701b8e3015f9a942f9543ddbca796a35afdc Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 18 Feb 2016 13:45:53 -0700 Subject: [PATCH] raco setup: defend against bad `scribblings` in "info.rkt" Closes #1142 --- racket/collects/setup/setup-core.rkt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/racket/collects/setup/setup-core.rkt b/racket/collects/setup/setup-core.rkt index d15b0cbbd9..0b8592482b 100644 --- a/racket/collects/setup/setup-core.rkt +++ b/racket/collects/setup/setup-core.rkt @@ -558,8 +558,15 @@ (not (eq? omit 'all))) (filter (lambda (p) (not (member p omit))) (map (lambda (s) (if (string? s) (string->path s) s)) - (map car (call-info info 'scribblings - (lambda () null) (lambda (x) #f))))) + (map car + (let ([v (call-info info 'scribblings (lambda () null) void)]) + ;; Ignore ill-formed 'scribblings entries at this level: + (if (list? v) + (for/list ([i (in-list v)] + #:when (and (pair? i) + (string? i))) + i) + null))))) null) (map (lambda (s) (if (string? s) (string->path s) s)) (call-info info 'compile-include-files (lambda () null) void))))