в связи с завозом в netbsd 10 (current) поддержки udf 2.50 для makefs/fsck решил собрать утилитки под Linux/termux
https://github.com/Randrianasulu/fsck_udf https://github.com/Randrianasulu/makefs_termux
оно вроде собирается и даже работает, но на моей Франкенслаке почему-то падает fsck. Разработчик любезно глянул в мой хак, и лог gdb но там похоже что-то не инициализируется нормально - я могу обойти краш но при этом fsck начинает ругаться на файл образ созданный makefs…
кто-нибудь может собрать на разных линуксах и попробовать создать образ
makefs -o v=2.50,V=2.50 image.udf tree/
и проверить его?
fsck_udf image.udf
падает так:
(gdb) run ../makefs_termux-main/test.disk
Starting program: /home/guest/fsck_udf-main/fsck_udf ../makefs_termux-main/test.disk
** Checking UDF file system on ../makefs_termux-main/test.disk
** Phase 1 - discovering format from disc
Filesystem sectorsize is 512 bytes.
Volume set `626424902ae528dd`
Primary volume `0f20d23b`
Logical volume `anonymous`
Bad descriptor sum in vds, ignoring
Unknown VDS type 59256 found, ignored
Minimum read version v2.50
Minimum write version v2.50
Maximum write version v2.50
Last logical volume integrity state is CLOSED.
Format flags
Program received signal SIGSEGV, Segmentation fault.
0x080587e0 in udf_translate_vtop (lb_num=24, vpart=1, lb_numres=0xffffd6e4, extres=0xffffd6e0) at udf_core.c:3967
3967 l_ea = udf_rw32(efe->l_ea);
(gdb) bt full
#0 0x080587e0 in udf_translate_vtop (lb_num=24, vpart=1,
lb_numres=0xffffd6e4, extres=0xffffd6e0) at udf_core.c:3967
pdesc = 0x0
sme = 0x1
short_ad = 0xf7e2e740 <main_arena>
efe = 0x0
ext = 2147483647
len = 32
lb_rel = 0
lb_packet = 528
vat_off = 8
start_lb = 2004
lb_offset = 1
end_lb_offset = 110
udf_rw32_lbmap = 34
flags = 134635536
vat_pos = 0xf7e2eaf0 <main_arena+944> "\350\352\342\367\350\352\342\367\330;\a\b\330;\a\b\370\352\342\367\370\352\342\367"
data_pos = 0x7 <error: Cannot access memory at address 0x7>
dscr_size = 216
l_ea = 1
l_ad = 92
icbflags = 0
addr_type = -136124608
rel = 57
part = 1
#1 0x08058a3e in udf_read_virt (blob=0x806f4f0, location=24,
vpart=1, sectors=1) at udf_core.c:4072
phys = 10
ext = 134635936
data = 0x806f4f0 ""
error = -136126464
#2 0x08058ec4 in udf_read_dscr_virt (sector=24, vpart=1,
dstp=0xffffd768) at udf_core.c:4218
dst = 0x806f4f0
new_dst = 0x0
--Type <RET> for more, q to quit, c to continue without paging--
pos = 0x805c580 "\nLast logical volume integrity state is %s.\n"
sectors = 4294956868
dscrlen = 512
sector_size = 512
error = 0
__PRETTY_FUNCTION__ = "udf_read_dscr_virt"
#3 0x0804d18b in udf_read_metadata_nodes (mapping=0x806edde,
log_part=1) at main.c:2342
dscr1 = 0x0
dscr2 = 0x0
dscr3 = 0x0
pmm = 0x806edde
raw_phys_part = 0
phys_part = 1
tagid = -136123104
file_type = -137605021
error = 0
#4 0x0804da31 in udf_process_vds () at main.c:2648
dscr = 0xf7e2e000
mapping = 0x806edde
pdesc = 0xffffd908
fsd_loc = {len = 134536814, loc = {lb_num = 134672064,
part_num = 61440}, impl = {bytes = "\006\b;\214\317\367",
im_used = {flags = 2054, unique_id = 4157574203}}}
pmap_pos = 0x806edde "\002@"
domain_name = 0x806ecf9 "*OSTA UDF Compliant"
map_name = 0x806ede3 "*UDF Metadata PartitionP\002\004\b"
check_name = 0x805cd3f "*UDF Metadata Partition"
pmap_stype = 2
pmap_size = 64
pmap_type = 4
log_part = 1
phys_part = 1
raw_phys_part = 0
n_pm = 2
--Type <RET> for more, q to quit, c to continue without paging--
n_phys = 1
n_virt = 0
n_spar = 0
n_meta = 1
len = 23
error = 134537169
#5 0x0804e1f8 in udf_check_VDS_areas () at main.c:2863
vds1_buf = 0x80667f0
vds2_buf = 0x806e800
vds1_size = 32768
vds2_size = 32768
error = -9760
error1 = 0
error2 = 0
__PRETTY_FUNCTION__ = "udf_check_VDS_areas"
#6 0x08051495 in checkfilesys (
given_dev=0xffffdc0c "../makefs_termux-main/test.disk")
at main.c:4310
ti = {tracknr = 1, sessionnr = 1, track_mode = 0 '\000',
data_mode = 0 '\000', flags = 192, track_start = 0,
next_writable = 97856, free_blocks = 0, packet_size = 1,
track_size = 97855, last_recorded = 97856}
open_flags = 2
error = 0
#7 0x080517ca in main (argc=0, argv=0xffffda8c) at main.c:4451
ret = 0
erg = -134356912
ch = -1
(gdb)