Re: xorriso in ghostbsd-build
Posted: Fri Sep 22, 2017 10:47 am
I'm stil wondering why removing a printf() in a different file would change the optimizer behavior ... if it is that the culprit.
Code: Select all
uint16_t *hfsplus_class_pages[256];
static uint16_t class_pages[19][256];
void make_hfsplus_class_pages()
{
int page_idx = -1, char_idx, i;
uint16_t *rpt, *page_pt;
int page_count = 0;
memset(class_pages, 0, 19 * 256);
for (i = 0; i < 256; i++)
hfsplus_class_pages[i] = NULL;
rpt = (uint16_t *) class_page_data;
page_pt = (uint16_t *) class_pages;
while (1) {
if (*rpt <= page_idx)
break;
page_count++;
page_idx = *(rpt++);
char_idx = -1;
while (1) {
if(*rpt <= char_idx)
break;
char_idx = *(rpt++);
page_pt[char_idx] = *(rpt++);
}
rpt++;
hfsplus_class_pages[page_idx] = class_pages[page_count - 1];
page_pt += 256;
}
}
Code: Select all
static uint16_t class_pages[19][256];
That's in libisofs/hfsplus_classes.c .make_hfsplus_class_pages();
Code: Select all
(gdb) p rpt-class_page_data
$1 = 632
(gdb) p sizeof(class_page_data)
$5 = 1262
(gdb) whatis class_page_data
type = uint16_t [631]
Code: Select all
--- libisofs/hfsplus_classes.c 2016-11-13 09:29:36.684112897 +0100
+++ libisofs/hfsplus_classes.c 2017-09-22 15:55:13.680658179 +0200
@@ -422,6 +422,10 @@ static uint16_t class_page_data[] = {
0x21, 0x230,
0x22, 0x230,
0x23, 0x230,
+ 0x00,
+
+ /* End of list */
+ 0x00
};
uint16_t *hfsplus_class_pages[256];
Code: Select all
(gdb) p rpt-class_page_data
$14 = 632
(gdb) p sizeof(class_page_data)
$15 = 1266
(gdb) whatis class_page_data
type = uint16_t [633]
Code: Select all
static uint16_t class_pages[19][256];
void make_hfsplus_class_pages()
{
...
memset(class_pages, 0, 19 * 256);
Yep. The found bug has all properties we were looking for.Applyed you patch, to add the end markers, and now it works!
LoLscdbackup wrote: Did you make sure that all other modifications of xorriso are reverted ?
(It would be embarrassing if your success was just another volatile
effect.)
Thanks to you for hunting down this nasty crack in the code.thanks for your fine cooperation on this issue, that afflicted us for long time!
The libraries libisofs, libburn, libisoburn, and the small dynamicallyI noticed a change in license, from GPL 2 to GPL 3
Code: Select all
xorriso 1.3.2 : RockRidge filesystem manipulator, libburnia project.
...
Provided under GNU GPL version 3 or later, due to libreadline license.
There is NO WARRANTY, to the extent permitted by law.
Code: Select all
--disable-libreadline --enable-libedit
Code: Select all
xorriso version : 1.4.9
Version timestamp : 2017.09.23.074650