Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server map error from Odyssey. #1041

Open
zaneenders opened this issue Nov 12, 2024 · 5 comments
Open

Server map error from Odyssey. #1041

zaneenders opened this issue Nov 12, 2024 · 5 comments
Assignees

Comments

@zaneenders
Copy link
Collaborator

zaneenders commented Nov 12, 2024

Herbie: 9287265 Odyssey: 8da4444

(FPCore (x y)
 :name "Logistic function from Lakshay Garg"
 (- (/ 2 (+ 1 (exp (* -2 x)))) 1))
Computing Job cost started:
  b022157322520323c25efc3c1a1aca8d7e7433ca (- (/ 2.0 (+ 1.0 (exp (* (- 2.0) x)))) 1.0)...
Herbie completed job: b022157322520323c25efc3c1a1aca8d7e7433ca
Error handling request: map: all lists must have same size
  first list length: 2
  other list length: 1
  procedure: #<procedure:real->repr>
  context...:
   /Applications/Racket v8.14/collects/racket/private/map.rkt:257:2: gen-map
   /Users/zane/.scribe/Projects/herbie/src/core/points.rkt:84:0: json->pcontext
   /Users/zane/.scribe/Projects/herbie/src/api/demo.rkt:419:4: function
   /Users/zane/.scribe/Projects/herbie/src/api/demo.rkt:426:31
   /Users/zane/.scribe/Projects/herbie/src/api/demo.rkt:240:2
   /Applications/Racket v8.14/collects/racket/contract/private/arrow-higher-order.rkt:375:33
   [repeats 1 more time]
   /Applications/Racket v8.14/share/pkgs/web-server-lib/web-server/dispatchers/dispatch-servlets.rkt:63:2
   /Applications/Racket v8.14/share/pkgs/web-server-lib/web-server/private/dispatch-server-with-connect-unit.rkt:141:2

@zaneenders zaneenders self-assigned this Nov 12, 2024
@zaneenders
Copy link
Collaborator Author

Ok so this is because the server is being sent a miss-match of variable declarations to variables uses. This is an Odyssey bug not an Herbie Bug.

@elmisback
Copy link
Collaborator

Odyssey should probably warn in this kind of case--this is a more general problem where we're not really doing any validation of FPCores I think

@pavpanchekha
Copy link
Contributor

pavpanchekha commented Nov 13, 2024

Can I close this Herbie bug and just leave the Odyssey one?

@zaneenders
Copy link
Collaborator Author

Should the server do validation FPCore input? or is this the validation and should return a 400 status code in this case?

@pavpanchekha
Copy link
Contributor

I think the client side should fix the underlying problem (track free variables & arguments separately) but it would be good if the server checked the inputs and produced a 400 status like you said instead of just crashing.

It would be good if no request, no matter how messed up, could crash the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants