Skip to content

Conversation

@kba
Copy link
Member

@kba kba commented Apr 18, 2025

No description provided.

@codecov
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.45%. Comparing base (c65b345) to head (c711543).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #220   +/-   ##
=======================================
  Coverage   58.45%   58.45%           
=======================================
  Files          12       12           
  Lines        1372     1372           
  Branches      323      323           
=======================================
  Hits          802      802           
  Misses        434      434           
  Partials      136      136           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

bertsky added 3 commits April 30, 2025 18:29
(to avoid triggering segfaults for failed asserts; this at least gives abort)
$(MAKE) -C build/tesseract training-install

TESSERACT_CONFIG ?= --disable-openmp --disable-shared CXXFLAGS="-g -O2 -fPIC -fno-math-errno -Wall -Wextra -Wpedantic"
TESSERACT_CONFIG ?= --disable-openmp --disable-shared CXXFLAGS="-g -O2 -fPIC -fno-math-errno -Wall -Wextra -Wpedantic -UNDEBUG"
Copy link
Contributor

@stweil stweil Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bertsky, it's a bit strange if you add an unrelated commit to a pull request which was already reviewed by yourself.

I am not sure that your change in line 126 is a good idea (debug code adds instructions that increase processing time), and you have not given a proper explanation of why you made it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid your change will do exactly what you wanted to avoid.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see this why we must at least avoid NDEBUG; keeping -g otherwise is a good idea to get symbols when there is a crash

all this is a far cry from being satisfactory (libtesseract must use exceptions in the end!), just less insane (segfault)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you prefer getting a SIGSEGV because of your change instead of getting an abort() like in the current configuration?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in other places like this we need !defined(NDEBUG) for certain safety checks

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you prefer getting a SIGSEGV because of your change instead of getting an abort() like in the current configuration?

No, segfault is obviously even worse, but I'm in a bind: the place that actually triggers my latest segfault/abort needs !defined(NDEBUG) – so the snippet I showed first behaves different, but is (currently) not as relevant

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See sirfz/tesserocr#365 for how I would like this to be solved.

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

Successfully merging this pull request may close these issues.

4 participants