Log of #mupdf at irc.freenode.net.

Search:
 <<<Back 1 day (to 2020/12/29)Fwd 1 day (to 2020/12/31)>>>20201230 
afxgroup evening guys, i'm trying to port MuPDF on AmigaOS4 using glut at moment18:26.56 
  the program starts correctly but when i try to open a file i get a DSI in some operations that using 64bits18:27.30 
  First of all. Is Big Endian supported?18:27.53 
  because AmigaOS on PPC and 68k is big endian18:28.23 
  i didn't find nothing where i can set if the platform is big endian or not. Is MuPDF endian agnostic?18:28.44 
sebras afxgroup: do you have a backtrace of where this happens?18:32.48 
  I haven't heard that we've had endianness issues in a long time.18:33.16 
afxgroup well. i have the exact line where it crash18:33.18 
  and is18:33.22 
  if (len > (int64_t)((INT64_MAX - t) / n))18:33.23 
  in pdf-xref.c18:33.31 
  my len value is "20"18:33.50 
  sorry18:34.02 
  my "n" value18:34.05 
sebras what about len and t?18:34.20 
afxgroup len = 177618:34.44 
  t = 70137818:34.53 
sebras right so you should get 1776 > LARGEVALUE and that ought to evaluate to false.18:35.32 
  btw, what is a DSI?18:36.27 
  data storage interrupt?18:36.58 
afxgroup https://www.papersoft.it/t.jpg18:37.06 
  DSI is like a null pointer exception18:37.13 
  A DSI exception occurs when a data memory access cannot be performed for18:37.38 
  yes is data storage interrupt18:38.07 
  i'm trying to debug the values and i have really strange values when i read files. For example in your fz_atof function you call in the stack trace the divide function18:39.36 
  and i get an error there. If I use strtof instead your fz_atof function i have no more errors18:40.05 
sebras len, t and n are all stackallocated, so alignment issues shouldn't be an issue.18:40.06 
  though I don't know if mupdf has ever been used with newlibc.18:40.24 
afxgroup that's why i suspect there is something in the endian that is causing the problem18:40.27 
  i could try to swap my libc18:40.41 
  just to see if the problem is the same but before this. Is there a switch or a define to use to enable/disable big endian or little endian?18:41.16 
sebras but regardless of what values len, t and n has there shouldn't be a problem?18:41.20 
  maybe if n == 0, because of division by zero.18:41.39 
  but that's not the case here.18:41.44 
afxgroup i don't know but i'm receiving strange values. maybe my values are trashed.18:41.59 
sebras afxgroup: n == 20 seems reasonable.18:42.16 
afxgroup yes18:42.36 
sebras I'd expect t to be about the same size as your file.18:42.41 
  afxgroup: are you able to share the file?18:44.16 
afxgroup the pdf file?18:44.25 
sebras yes18:46.48 
afxgroup https://www.papersoft.it/AISS47.pdf18:47.16 
sebras on my system I get len == 1776, t == 701378 and n == 2018:49.05 
afxgroup so is the same18:49.21 
sebras but I can successfully open the file, so the input values are correct.18:49.34 
afxgroup ok. so is not an endianess problem18:49.47 
  i'll try to use a different libc instead of newlib18:50.01 
  just to see if something change18:50.10 
sebras afxgroup: can you try one thing for me? can you do these changes to the source code and recompile? https://pastebin.com/raw/BU0XcaRc18:52.50 
afxgroup yes18:53.42 
sebras afxgroup: I don't understand wht the issue is yet, but I'm thinking since the comparison is between int and int64_t maybe that causes an issue.18:55.17 
  the values of the variables oughts to be the same though!18:55.42 
afxgroup indeed18:59.13 
  is the same18:59.14 
  let me force the align in the compiler18:59.31 
  no way. well. thank you for your time19:02.05 
  i'll try to find what is wrong19:02.12 
  i'll try to use a different clib and see if something change19:02.23 
  happy new year :)19:04.19 
  well19:21.26 
  https://www.papersoft.it/t1.jpg19:21.27 
  https://www.papersoft.it/t2.jpg19:21.30 
  with clib2 it is working19:21.35 
  however the title has trash characters19:21.47 
  and if i use page down i get that assertion19:21.56 
  just to inform you :)19:22.02 
  i have to debug everything19:22.08 
superturbocat Hello, please tell me. Is there normal mujs documentation? And the examples on the site are outdated.20:41.10 
  Well, please help me how to make a function in C that returns an object.21:04.20 
 <<<Back 1 day (to 2020/12/29)Forward 1 day (to 2020/12/31)>>> 
ghostscript.com #ghostscript
Search: