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

tesseract call abort fn #24

Open
ava57r opened this issue Oct 1, 2023 · 4 comments
Open

tesseract call abort fn #24

ava57r opened this issue Oct 1, 2023 · 4 comments

Comments

@ava57r
Copy link
Contributor

ava57r commented Oct 1, 2023

Hello
tesseract cpp can call abort fn
https://github.com/tesseract-ocr/tesseract/blob/main/src/ccutil/errcode.cpp#L83

rust can not catch this call
Could We make this call more safer?
rust-lang/rust#74990

@ccouzens
Copy link
Owner

ccouzens commented Nov 4, 2023

Hey

Sorry I'm only now getting round to looking at this.

I don't think there's much we can do directly. I think the mentions of abort in the rust tracker issue are different to the abort in errcode.cpp. the former is the general idea of the program quitting in regards to panics. The latter is the libc function.

What we could do is:

  1. Sandbox the library using wasm. There are likely to be performance issues with that as tesseract presumably uses SIMD and threading.
  2. Ask tesseract upstream to remove this call to abort. Do you have a test case that triggers this abort?

@ava57r
Copy link
Contributor Author

ava57r commented Nov 8, 2023

I did not catch a test case.

@ava57r
Copy link
Contributor Author

ava57r commented Dec 15, 2023

2023-12-14-15-48-Jpeg-59

I caught this on production but I can not reproduce in test case

@ava57r
Copy link
Contributor Author

ava57r commented Jan 30, 2024

I updated on v5.3.4

I found this

!w_it.cycled_list():Error:Assert failed:in file /tmp/tesseract-5.3.4/src/ccstruct/pageres.cpp, line 1502

https://github.com/tesseract-ocr/tesseract/blob/main/src/ccstruct/pageres.cpp#L1502

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

No branches or pull requests

2 participants