Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ 1586032 ] core dump during test #5

Closed
GoogleCodeExporter opened this issue Apr 14, 2015 · 1 comment
Closed

[ 1586032 ] core dump during test #5

GoogleCodeExporter opened this issue Apr 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Thomas Klausner - thomasklausner(sf)

With the patches from 1586031 applied, I get a core
dump when I try to run tesseract on phototest.tif on
NetBSD-4.99.3/amd64.

The backtrace is:
Program terminated with signal 11, Segmentation fault.
#0 0x00000000004c1c70 in reverse32 ()
(gdb) bt
#0 0x00000000004c1c70 in reverse32 ()
#1 0x00000000004aed12 in read_squished_dawg ()
#2 0x00000000004aaded in init_permute ()
#3 0x0000000000485779 in program_editup ()
#4 0x0000000000485869 in start_recog ()
#5 0x0000000000403d04 in init_tesseract ()
#6 0x000000000040309b in main ()
(gdb)

I don't know yet what causes this problem.

Comments

Date: 2006-10-31 13:34
Sender: ac_account
Logged In: YES 
user_id=1016107

This particular problem is due to ccutil/host.h having
inconsistent definitions for 32bit ints:

typedef long INT32;
typedef unsigned int UINT32;

This is plainly wrong, as int and long have no reason to
have the same size on a given platform. As a temproary fix,
changing long to int would make this particular crash go
away (and be replaced by compile errors and other crashes).
A better solution IMHO would be, since configure checks for
the C99 header stdint.h anyway, to do sokmething like:

#ifdef HAVE_STDINT_H /*defined or not in the generated
config_auto.h */
#include <stdint.h>

typedef int8_t INT8;
typedef uint8_t UINT8;
typedef int16_t INT16;
typedef uint16_t UINT16;
typedef int32_t INT32;
typedef uint32_t UINT32;

/* same for pointers and const pointers */
#else
/* original defines, for old compilers that do not have
stdint.h */
#endif

and leave the platform-specific C library figure out how to
define the sizes.

Note that making INT32 a 32-bit integer will break some
pointer-to INT32 conversions (gcc flags that as an error) -
typically in lengths passed through pointers. Making the
length a long or an explicit cast pointer->long->INT32 fixes
that problem.

And please, please, maintainers, fix the bloody name
spellings - s/case_sensative/case_sensitive/p and so on. The
code is spaghetti enough without having to parse Engrish as
well.

Original issue reported on code.google.com by tmb...@gmail.com on 7 Mar 2007 at 10:26

@GoogleCodeExporter
Copy link
Author

In theory this should be fixed in 1.04. Many 64 bit portability issues were 
fixed in
1.03, but 1.04 is better in this respect. Please verify and report as I don't 
have a
NetBSD-4.99.3/amd64 to hand to test on.

Original comment by theraysm...@gmail.com on 17 May 2007 at 6:20

  • Changed state: Fixed

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant