Repository navigation
feat(types): add Go baseline runtime types (string, slice, eface, iface, hmap) - #6831
Conversation
…ce, hmap) - Add types-golang-32.sdb.txt and types-golang-64.sdb.txt defining canonical Go runtime structures (stringStruct, string, slice, eface, iface, hmap). - Register types-golang-32 and types-golang-64 in sdb_types_files in librz/arch/types/meson.build. - Load architecture-matched types-golang SDB during Go function recovery in rz_core_analysis_recover_golang_functions(). - Supports both system and user-home types search paths.
|
thank you for review, addressed them all |
There was a problem hiding this comment.
@notxvilka have a look please because it seems wr are always applying the types here
3854eae to
88410ae
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 12 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
notxvilka
left a comment
There was a problem hiding this comment.
LGTM. It made golang tests slightly slower though
|
yes sorry for that, i will see if i can make it better |
Your checklist for this pull request
RZ_APIfunction and struct this PR changes.RZ_API).Detailed description
This PR introduces architecture-aware standard Go runtime data structures (
stringStruct,string,slice,eface,iface,hmap) into Rizin's type subsystem and automatically loads them during Golang binary analysis.Changes
librz/arch/types/types-golang-32.sdb.txtandlibrz/arch/types/types-golang-64.sdb.txt.struct stringStruct/typedef stringstruct sliceandstruct runtime.slicestruct efaceandstruct runtime.efacestruct ifaceandstruct runtime.ifacestruct hmapandstruct runtime.hmaptypes-golang-32andtypes-golang-64insdb_types_fileswithinlibrz/arch/types/meson.build.rz_golang_load_types()inlibrz/core/golang.c.pclntabfunctions duringrz_core_analysis_recover_golang_functions().types_dirand userhome_types_dir(~/.local/share/rizin/types).Relationship
Complements #6830 (Calling Conventions and ABI auto-assignment). Together, these provide the type foundation required by decompilers (
rz-ghidra) and analysts to inspect Go parameters, return values, and memory buffers.Test plan
meson test -C build --suite unit).ts/tccorrectly emits struct definitions)./bin/ls) remain clean with zero type pollution.test/db/analysis/golangto ensure Go runtime types (e.g.string) are loaded.Closing issues