Comments (4)
Reproduced:
panic: runtime error: slice bounds out of range [18446744073692771816:6638624]
goroutine 1 [running]:
github.com/goretk/gore.typeParse(0xc0009b8060, 0xc0000f2a20, 0xfffffffffefff5e8, 0xc001a4c020, 0x654c20, 0x654c20, 0x1000a20, 0x0)
github.com/goretk/[email protected]/type.go:321 +0x38d1
github.com/goretk/gore.typeParse(0xc0009b8060, 0xc0000f2a20, 0x129c60, 0xc001a4c020, 0x654c20, 0x654c20, 0x1000a20, 0x0)
github.com/goretk/[email protected]/type.go:618 +0x1215
github.com/goretk/gore.typeParse(0xc0009b8060, 0xc0000f2a20, 0xeed00, 0xc001a4c020, 0x654c20, 0x654c20, 0x1000a20, 0x0)
github.com/goretk/[email protected]/type.go:402 +0x241b
github.com/goretk/gore.getTypes(0xc0000f2a20, 0x5becc0, 0xc00009a030, 0x0, 0x522580, 0xc0000d6140)
github.com/goretk/[email protected]/type.go:76 +0x287
github.com/goretk/gore.(*GoFile).GetTypes(0xc0000d6140, 0x0, 0x0, 0x0, 0x0, 0x0)
github.com/goretk/[email protected]/file.go:262 +0x52
main.standalone()
github.com/goretk/redress@/standalone.go:59 +0x2d6
main.main()
github.com/goretk/redress@/main.go:71 +0x4c
from gore.
@Li4n0, I have identified what the issue is. The current parsing logic does not handle functions that have methods correctly. To fix this I would like to make some major refactoring of the logic first. This will take some time.
I have a workaround to fix the out of bounds read and gracefully handle function types with methods. It will not be able to identify the function argument types and return types but it will not panic.
Is the workaround solution acceptable for now?
from gore.
@TcM1911 Yes it's acceptable. Thanks for your reply.
from gore.
This was fixed with #15. A new release 0.8.4 was released with this fix (https://github.com/goretk/gore/releases/tag/v0.8.4).
Redress was also updated to 0.6.3 that pulls in this fix.
https://github.com/goretk/redress/releases/tag/v0.6.3
from gore.
Related Issues (20)
- String extraction functionality
- MIPS support
- Fix the type parser
- Fix function line logic
- Don't skip built-in packages
- Use semver library for version compare
- panic: runtime error: index out of range [757869355] with length 33282560 HOT 2
- Fix map struct parsing for Go 1.7 to 1.13 HOT 1
- Extract build information if available
- GetTypes panic: runtime error: invalid memory address or nil pointer dereference. HOT 1
- support go1.18 HOT 2
- no pclntab located HOT 1
- GetGoRoot return ErrNoGoRootFound when running on windows
- Replacing extracted information HOT 3
- Confusion about LICENSE HOT 2
- gosym can provide the wrong address for funcs in cgo go binary HOT 14
- external linked pie elf binary can work without .gopclntab section
- codecov/codecov-action v1 will not work after 2024 Feb 1 HOT 1
- `GoVersionCompare` can provide wrong result
- Generate of moduledata timeout HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gore.