Giter Site home page Giter Site logo

Comments (7)

hazbo avatar hazbo commented on August 24, 2024

Thanks for reporting, will look into this today. Looks like it may be an issue with my variable parser.

from httpu.

hazbo avatar hazbo commented on August 24, 2024

@JaikrishnaTS So far I have been unable to reproduce. Did you first run httpu pull? And is there any chance you could send me some specific build / running steps as to how you produce this?
Thanks again!

from httpu.

JaikrishnaTS avatar JaikrishnaTS commented on August 24, 2024

Hello @hazbo I wanted to make sure I followed the installation instructions exactly from the repo and so I deleted my sources, builds, ~.httpu and rebuilt on commit f063213

I ran make, then httpu pull, can confirm that the same issue is present.
My go version go version go1.10 gccgo (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1) linux/amd64

from httpu.

hazbo avatar hazbo commented on August 24, 2024

@JaikrishnaTS thank you for providing me with these details! Will look into this and get back to you.

from httpu.

AdvancedHacker101 avatar AdvancedHacker101 commented on August 24, 2024

Hey, @JaikrishnaTS
You could try the latest version where the vendor/ folder is removed, because the stack trace says that the error comes from there.
Also could you post your code at line 43 from the utils/varparser/varparser.go file?
The error is wierd because at line 43, there's a for loop, and the error would normally raise at the nearest line which tries to access s[k] which is the switch statement.

from httpu.

JaikrishnaTS avatar JaikrishnaTS commented on August 24, 2024

@AdvancedHacker101 I checked and it looks like the issue is still present.
I poked around a bit more and I believe this is the simple case
https://play.golang.org/p/_3PDTmHwuYX

While this program doesn't produce error on the online interpreter nor on yours, the go compiler on my machine is probably causing it. (same result on the s = s[:k] + s[k+1:] variant)
I believe there's some some sort of optimization that happened in the compiler causing the len(s) check to be cached/ignored

from httpu.

AdvancedHacker101 avatar AdvancedHacker101 commented on August 24, 2024

But then it would still panic at the switch statement, but it panics at the for loop.
This could be related to optimisation, because your for loop may try to load the value of s[k] even, if it's discarded after by the _.
Anyways I think the simplest solution here is to write a normal for loop, and then we don't have to deal with this, because there's no uncontrolled access to s[k] then.

from httpu.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.