Bump project version to 25 due to asm.demangle removal (#6461)

This commit is contained in:
Khairul Azhar Kasmiran 2026-06-04 22:39:57 +08:00 committed by GitHub
parent 0374f28e03
commit 7362637334
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 643 additions and 2 deletions

View file

@ -25,7 +25,7 @@
* * Implement a function like `bool rz_project_migrate_migrate_v1_v2(RzProject *prj, RzSerializeResultInfo *res)`
* which edits prj in-place and converts it from the previous to the current version.
* * Append this function to the `migrations` array below.
* * Implement tests in `test/unit/test_project_migrate.c` that cover all changes (see the documentation there).
* * Implement tests in `test/integration/test_project_migrate.c` that cover all changes (see the documentation there).
*/
// --
@ -786,6 +786,21 @@ RZ_API bool rz_project_migrate_v23_v24(RzProject *prj, RzSerializeResultInfo *re
return true;
}
// --
// Migration 24 -> 25
//
// Changes from 0374f28e0384fdc6e218511f3ba986312c6d98ab:
// Removed "asm.demangle" option.
RZ_API bool rz_project_migrate_v24_v25(RzProject *prj, RzSerializeResultInfo *res) {
Sdb *core_db;
RZ_SERIALIZE_SUB(prj, core_db, res, "core", return false;);
Sdb *config_db;
RZ_SERIALIZE_SUB(core_db, config_db, res, "config", return false;);
sdb_remove(config_db, "asm.demangle");
return true;
}
static bool (*const migrations[])(RzProject *prj, RzSerializeResultInfo *res) = {
rz_project_migrate_v1_v2,
rz_project_migrate_v2_v3,
@ -810,6 +825,7 @@ static bool (*const migrations[])(RzProject *prj, RzSerializeResultInfo *res) =
rz_project_migrate_v21_v22,
rz_project_migrate_v22_v23,
rz_project_migrate_v23_v24,
rz_project_migrate_v24_v25,
};
/// Migrate the given project to the current version in-place

View file

@ -12,7 +12,7 @@
extern "C" {
#endif
#define RZ_PROJECT_VERSION 24
#define RZ_PROJECT_VERSION 25
typedef Sdb RzProject;
@ -69,6 +69,7 @@ RZ_API bool rz_project_migrate_v20_v21(RzProject *prj, RzSerializeResultInfo *re
RZ_API bool rz_project_migrate_v21_v22(RzProject *prj, RzSerializeResultInfo *res);
RZ_API bool rz_project_migrate_v22_v23(RzProject *prj, RzSerializeResultInfo *res);
RZ_API bool rz_project_migrate_v23_v24(RzProject *prj, RzSerializeResultInfo *res);
RZ_API bool rz_project_migrate_v24_v25(RzProject *prj, RzSerializeResultInfo *res);
RZ_API bool rz_project_migrate(RzProject *prj, unsigned long version, RzSerializeResultInfo *res);
#ifdef __cplusplus

View file

@ -384,6 +384,7 @@ Detailed project load info:
project migrated from version 21 to 22.
project migrated from version 22 to 23.
project migrated from version 23 to 24.
project migrated from version 24 to 25.
EOF
RUN

View file

@ -771,6 +771,24 @@ static bool test_migrate_v23_v24_bitfield() {
mu_end;
}
static bool test_migrate_v24_v25_asm_demangle() {
RzProject *prj = rz_project_load_file_raw("prj/v24-asm-demangle.rzdb");
mu_assert_notnull(prj, "load raw project");
RzSerializeResultInfo *res = rz_serialize_result_info_new();
bool s = rz_project_migrate_v24_v25(prj, res);
mu_assert_true(s, "migrate success");
Sdb *core_db = sdb_ns(prj, "core", false);
mu_assert_notnull(core_db, "core ns");
Sdb *config_db = sdb_ns(core_db, "config", false);
mu_assert_notnull(config_db, "config ns");
mu_assert_null(sdb_get(config_db, "asm.demangle"), "asm.demangle doesn't exist");
rz_serialize_result_info_free(res);
rz_project_free(prj);
mu_end;
}
/// Load project of given version from file into core and check the log for migration success messages
#define BEGIN_LOAD_TEST(core, version, file) \
do { \
@ -1209,6 +1227,7 @@ int all_tests() {
mu_run_test(test_migrate_v21_v22_gadget_config);
mu_run_test(test_migrate_v22_v23_enum);
mu_run_test(test_migrate_v23_v24_bitfield);
mu_run_test(test_migrate_v24_v25_asm_demangle);
mu_run_test(test_load_v1_noreturn);
mu_run_test(test_load_v1_noreturn_empty);
mu_run_test(test_load_v1_unknown_type);

View file

@ -0,0 +1,604 @@
/
type=rizin rz-db project
version=24
/core
blocksize=0x100
offset=0x0
/core/analysis
/core/analysis/blocks
/core/analysis/callables
/core/analysis/cc
/core/analysis/classes
/core/analysis/classes/attrs
/core/analysis/functions
/core/analysis/hints
/core/analysis/imports
/core/analysis/meta
/core/analysis/meta/spaces
name=CS
spacestack=["*"]
/core/analysis/meta/spaces/spaces
bin=s
/core/analysis/noreturn
/core/analysis/types
/core/analysis/vars
/core/analysis/xrefs
/core/config
analysis.apply.signature=true
analysis.arch=x86
analysis.armthumb=false
analysis.autoname=false
analysis.bb.maxsize=63K
analysis.bits=64
analysis.brokenrefs=false
analysis.calls=false
analysis.cpp.abi=itanium
analysis.cpu=x86
analysis.datarefs=false
analysis.delay=true
analysis.depth=64
analysis.detectwrites=false
analysis.esil=false
analysis.fcn_max_size=256K
analysis.fcnprefix=fcn
analysis.from=0xffffffffffffffff
analysis.gp=0
analysis.gpfixed=true
analysis.graph_depth=256
analysis.hasnext=false
analysis.hpskip=false
analysis.ignbithints=false
analysis.in=io.maps.x
analysis.jmp.above=true
analysis.jmp.after=true
analysis.jmp.cref=false
analysis.jmp.indir=false
analysis.jmp.mid=true
analysis.jmp.ref=true
analysis.jmp.retpoline=true
analysis.jmp.tbl=true
analysis.jmp.tblmax=512
analysis.jmp.tblmaxoffset=0x00001000
analysis.limits=false
analysis.loads=false
analysis.nonull=0
analysis.nopskip=true
analysis.norevisit=false
analysis.prelude.limit=0x01400000
analysis.ptrdepth=3
analysis.pushret=false
analysis.recont=false
analysis.refstr=false
analysis.resolve.pointers=true
analysis.rnr=false
analysis.roregs=gp,zero
analysis.sleep=0
analysis.strings=false
analysis.timeout=0
analysis.to=0xffffffffffffffff
analysis.trap.after=false
analysis.trycatch=false
analysis.types.constraint=false
analysis.types.spec=gcc
analysis.types.verbose=false
analysis.vars=true
analysis.vinfun=true
analysis.vinfunrange=false
asm.analysis=false
asm.arch=x86
asm.bb.line=false
asm.bb.middle=true
asm.bits=64
asm.bytes=false
asm.bytes.right=false
asm.bytes.space=false
asm.calls=true
asm.capitalize=false
asm.cmt.col=71
asm.cmt.esil=false
asm.cmt.flgrefs=true
asm.cmt.il=false
asm.cmt.off=nodup
asm.cmt.patch=false
asm.cmt.refs=false
asm.cmt.right=true
asm.comments=true
asm.cpu=x86
asm.cycles=false
asm.cyclespace=false
asm.debuginfo=true
asm.debuginfo.abspath=false
asm.debuginfo.file=true
asm.debuginfo.lines=true
asm.decode=false
asm.decoff=false
asm.demangle=true
asm.describe=false
asm.emu=false
asm.esil=false
asm.family=false
asm.fcn.signature=true
asm.fcn.size=false
asm.flags=true
asm.flags.inbytes=false
asm.flags.inline=false
asm.flags.limit=0
asm.flags.maxname=0
asm.flags.middle=2
asm.flags.offset=false
asm.flags.real=false
asm.functions=true
asm.hint.call=true
asm.hint.call.indirect=true
asm.hint.cdiv=false
asm.hint.emu=false
asm.hint.jmp=false
asm.hint.lea=false
asm.hint.pos=1
asm.hints=true
asm.imm.hash=0
asm.imm.str=true
asm.imm.trim=false
asm.indent=false
asm.indentspace=2
asm.instr=true
asm.invhex=false
asm.lbytes=true
asm.lines=true
asm.lines.bb=true
asm.lines.call=false
asm.lines.fcn=true
asm.lines.maxref=0
asm.lines.out=true
asm.lines.ret=false
asm.lines.right=false
asm.lines.wide=false
asm.lines.width=7
asm.marks=true
asm.meta=true
asm.midcursor=false
asm.middle=false
asm.minicols=false
asm.nbytes=6
asm.nodup=false
asm.noisy=true
asm.offset=true
asm.optype=false
asm.os=none
asm.parser=x86.pseudo
asm.payloads=false
asm.pcalign=1
asm.pseudo=false
asm.refptr=true
asm.reloff=false
asm.reloff.flags=false
asm.section=false
asm.section.col=30
asm.section.name=true
asm.section.perm=false
asm.seggrn=4
asm.segoff=false
asm.size=false
asm.slow=true
asm.stackptr=false
asm.sub.jmp=true
asm.sub.names=true
asm.sub.reg=false
asm.sub.rel=true
asm.sub.section=false
asm.sub.tail=false
asm.sub.var=true
asm.sub.varmin=256
asm.sub.varonly=true
asm.symbol=false
asm.symbol.col=40
asm.syntax=intel
asm.tabs=6
asm.tabs.off=0
asm.tabs.once=true
asm.trace=false
asm.tracespace=false
asm.types=1
asm.ucase=false
asm.usercomments=false
asm.var=true
asm.var.access=false
asm.var.fold=none
asm.var.summary=0
asm.xrefs=true
asm.xrefs.code=true
asm.xrefs.fold=5
asm.xrefs.max=20
basefind.alignment=0x00001000
basefind.max.threads=0
basefind.min.score=1
basefind.min.string=10
basefind.progress=false
basefind.search.end=0xf0000000
basefind.search.start=0
bin.at=false
bin.b64str=false
bin.baddr=0
bin.classes=true
bin.dbginfo=true
bin.dbginfo.debug_file_directory=/usr/lib/debug
bin.dbginfo.debuginfod=false
bin.dbginfo.debuginfod_urls=http://debuginfod.elfutils.org/
bin.demangle=true
bin.demangle.flags=base
bin.demangle.libs=false
bin.filter=true
bin.hashes.default=md5,sha1,sha256,crc32,entropy,temperature
bin.hashlimit=10M
bin.laddr=0
bin.libs=false
bin.relocs=true
bin.show.blocks=true
bin.strings=true
bin.usextr=true
bin.verbose=false
cfg.bigendian=false
cfg.cpuaffinity=0
cfg.debug=false
cfg.editor=vi
cfg.fortunes=true
cfg.fortunes.clippy=false
cfg.fortunes.file=tips
cfg.plugins=true
cfg.prefixdump=dump
cfg.seek.histsize=63
cfg.seek.silent=false
cfg.user=pid6065
cfg.wseek=false
cmd.depth=10
cmd.hitinfo=1
cmd.repeat=false
dbg.aftersyscall=true
dbg.backend=native
dbg.bep=loader
dbg.bpinmaps=true
dbg.bpsysign=false
dbg.btalgo=fuzzy
dbg.btdepth=128
dbg.clone=false
dbg.consbreak=false
dbg.create_new_console=true
dbg.execs=false
dbg.exitkills=true
dbg.follow=64
dbg.follow.child=false
dbg.forks=false
dbg.funcarg=false
dbg.gdb.page_size=0x00001000
dbg.gdb.retries=10
dbg.glibc.fastbinmax=10
dbg.glibc.fc_offset=640
dbg.glibc.ma_offset=0
dbg.glibc.tcache=true
dbg.glibc.version=auto
dbg.hwbp=false
dbg.jemalloc.page_size=auto
dbg.jemalloc.version=auto
dbg.malloc=glibc
dbg.rebase=true
dbg.skipover=false
dbg.slow=false
dbg.status=false
dbg.swstep=false
dbg.threads=false
dbg.trace=false
dbg.trace.inrange=false
dbg.trace.libs=true
dbg.trace.tag=0
dbg.trace_continue=true
dbg.verbose=false
dbg.windows.version=auto
diff.bare=false
diff.from=0
diff.sort=addr
diff.to=0
dir.depth=10
dir.home=/home/kazarmy
dir.magic=/home/kazarmy/bin/rizin-gcc/share/rizin/magic
dir.plugins=/home/kazarmy/bin/rizin-gcc/lib/x86_64-linux-gnu/rizin/plugins
dir.prefix=/home/kazarmy/bin/rizin-gcc
dir.projects=/home/kazarmy/.local/share/rizin/projects
dir.types=/usr/include
elf.checks.sections=true
elf.checks.segments=true
elf.load.sections=true
emu.lazy=false
emu.pre=false
emu.skip=ds
emu.ssa=false
emu.stack=false
emu.str=false
emu.str.flag=true
emu.str.inv=true
emu.str.lea=true
emu.str.off=false
emu.write=false
esil.addr.size=64
esil.breakoninvalid=false
esil.exectrap=false
esil.gotolimit=0x00001000
esil.iotrap=true
esil.nonull=false
esil.prestep=true
esil.romem=false
esil.stack.addr=0x00100000
esil.stack.depth=256
esil.stack.pattern=0
esil.stack.size=0x000f0000
esil.stats=false
esil.timeout=0
esil.verbose=0
file.info=true
file.lastpath=/home/kazarmy/=.bin
file.loadalign=0x00000400
file.openmany=1
file.path=/home/kazarmy/=.bin
flirt.ignore.unknown=true
flirt.node.optimize=2
flirt.sig.deflate=false
flirt.sig.file=all
flirt.sig.library=Built with rizin 0.9.0
flirt.sig.os=all
flirt.sig.version=10
flirt.sigdb.load.extra=true
flirt.sigdb.load.home=true
flirt.sigdb.load.system=true
gadget.cache=true
gadget.comments=false
gadget.conditional=false
gadget.len=5
gadget.subchains=false
graph.aeab=false
graph.body=true
graph.bytes=false
graph.cmtright=false
graph.comments=true
graph.dotted=false
graph.dummy=true
graph.edges=2
graph.few=false
graph.font=Courier
graph.from=0xffffffffffffffff
graph.gv.current=false
graph.gv.format=gif
graph.hints=true
graph.invscroll=false
graph.json.usenames=true
graph.layout=0
graph.linemode=1
graph.nodejmps=true
graph.ntitles=true
graph.refs=false
graph.scroll=5
graph.to=0xffffffffffffffff
graph.trace=false
hex.align=false
hex.ascii=true
hex.bytes=true
hex.cols=16
hex.comments=true
hex.compact=false
hex.depth=5
hex.flagsz=0
hex.hdroff=false
hex.header=true
hex.nodot=false
hex.offset=true
hex.onechar=false
hex.pairs=true
hex.section=false
hex.stride=0
hex.style=false
http.auth=false
http.bind=localhost
http.browser=xdg-open
http.colon=false
http.cors=false
http.dirlist=false
http.homeroot=/home/kazarmy/.local/share/rizin/www
http.index=index.html
http.log=true
http.maxsize=0
http.port=9090
http.root=/home/kazarmy/bin/rizin-gcc/share/rizin/www
http.stop.after=0
http.timeout=3
http.upget=false
http.upload=false
http.uproot=/tmp
http.verbose=false
io.0xff=255
io.aslr=false
io.autofd=true
io.cache=false
io.cache.auto=false
io.cache.read=false
io.cache.write=false
io.exec=true
io.ff=true
io.pava=false
io.pcache=false
io.pcache.read=false
io.pcache.write=false
io.unalloc=false
io.unalloc.ch=.
io.va=true
log.colors=false
log.events=false
log.level=3
log.show.sources=false
magic.depth=100
pdb.autoload=0
pdb.extract=1
pdb.server=https://msdl.microsoft.com/download/symbols
pdb.symstore=/home/kazarmy/.local/share/rizin/pdb
prj.compress=false
prj.file=v24-asm-demangle.rzdb
rap.loop=true
rzil.step.events.halt_on_exc=div0,fp_invalid_op
rzil.step.events.read=false
rzil.step.events.write=true
scr.bgfill=false
scr.breaklines=false
scr.color=2
scr.color.args=true
scr.color.bytes=true
scr.color.grep=false
scr.color.ops=true
scr.color.pipe=false
scr.columns=0
scr.confirmquit=false
scr.dumpcols=false
scr.echo=false
scr.feedback=1
scr.fgets=false
scr.fix.columns=0
scr.fix.rows=0
scr.flush=false
scr.gadgets=true
scr.highlight.grep=false
scr.hist.block=true
scr.hist.height=0
scr.hist.ruler=true
scr.hist.width=0
scr.histsave=true
scr.html=false
scr.interactive=true
scr.last=true
scr.linesleep=0
scr.maxtab=0x00001000
scr.nkey=flag
scr.null=false
scr.pagesize=1
scr.panelborder=false
scr.pf.short=false
scr.prompt=true
scr.prompt.file=false
scr.prompt.flag=false
scr.prompt.flag.only=false
scr.prompt.mode=false
scr.prompt.popup=false
scr.prompt.sect=false
scr.prompt.vi=false
scr.randpal=false
scr.responsive=false
scr.rows=0
scr.scrollbar=0
scr.slow=true
scr.square=true
scr.strconv=asciiesc
scr.utf8=true
scr.utf8.curvy=false
scr.visual.mode=0
scr.wheel=true
scr.wheel.nkey=false
scr.wheel.speed=4
scr.wideoff=false
search.align=1
search.case_sensitive=smart
search.chunk=0
search.contiguous=true
search.distance=0
search.esilcombo=8
search.flags=true
search.from=0
search.in=io.maps
search.kwidx=0
search.max_threads=0
search.maxhits=0
search.overlap=false
search.prefix=hit
search.show=true
search.show_progress=num_hits
search.str.check_ascii_freq=1
search.str.max_length=0x00000800
search.str.max_region_size=0x00a00000
search.str.min_length=4
search.str.raw_alignment=0x00010000
search.to=0xffffffffffffffff
stack.anotated=false
stack.bytes=true
stack.delta=0
stack.reg=SP
stack.size=64
str.encoding=guess
str.escbslash=false
str.search.mode=auto
str.search.reload=true
tcp.islocal=false
time.fmt=%Y-%m-%d %H:%M:%S %z
time.zone=0
zoom.byte=h
zoom.from=0
zoom.in=io.map
zoom.maxsz=512
zoom.to=0
/core/debug
/core/debug/breakpoints
/core/file
absolute=/home/kazarmy/=.bin
raw==.bin
relative==.bin
/core/flags
realnames=0
/core/flags/flags
/core/flags/spaces
name=fs
spacestack=["*"]
/core/flags/spaces/spaces
classes=s
relocs=s
sections=s
segments=s
symbols=s
/core/flags/tags
tag.alloc=malloc free$ calloc kalloc realloc
tag.dylib=dlopen dlsym dlclose mmap LoadLibrary GetProcAddress
tag.env=getenv putenv unsetenv setenv GetEnvironmentVariable SetEnvironmentVariable ExpandEnvironmentStrings
tag.fs=open$ close read$ write CloseHandle FindFirstFileW _wfopen _wstat ftruncate lseek _chsize GetFullPathName realpath RemoveDirectory DeleteFile CreateFile WriteFile UnmapViewOfFile CreateFileMapping MapViewOfFile readlink chmod fchmod chown stat fstat lstat fstatat lstat64 stat64 chflags fchflags lchflags
tag.network=socket connect bind$ listen accept sendto recvfrom gethostbyname htons ntohs
tag.process=getpid getppid kill exit abort assert gethostid sethostid sysctl
tag.stdout=^printf puts write
tag.string=strcat strcpy strncpy strlen strtok strstr strlcpy asprintf sprintf snprintf
tag.threads=pthread_create pthread_mutex_init pthread_cond_init CreateThread TerminateThread WaitForSingleObject GetCurrentThreadId
tag.time=settimeofday gettimeofday time adjtime ctime timed date$ sleep Sleep usleep clock_nanosleep localtime asctime difftime gmtime mktime timelocal timegm tzfile tzset
/core/flags/zones
/core/marks
/core/marks/marks
/core/seek
0={"offset":0,"cursor":0,"current":true}