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

Apache POI: Improve coverage counting and add a few more expected exceptions #11418

Merged

Conversation

centic9
Copy link
Contributor

@centic9 centic9 commented Dec 29, 2023

As a general solution for handling excluding classes from JaCoCo coverage counting was not merged (See #10860#issuecomment-1870891873 ), this PR tries to implement a different approach which separates the class-files into two jar-files and this way at least allows to exclude code of third-party libraries when reporting coverage of fuzzing.

Also add two expected exceptions and adjust one limit to match the amount of memory which oss-fuzz uses here.

Some were added in Apache POI recently

(cherry picked from commit 2dae2bc1d0cde0c797365b51488e47cae7ad15a5)
…included in coverage report

Introduce two jar-files to separate .class files into two jar files, one
which is included in coverage reporting and one which contains libraries
which should not appear in the coverage report.

Unfortunately this only allows control on "artifact" level, which means single
uninteresting classes/packages cannot be excluded.

Related to google#10826 and google#10860

(cherry picked from commit 2b48e656646d4c3aa61ea44b5b3edef59942f142)
Otherwise we cannot avoid OOM with the value of
Xmx that is used by oss-fuzz

(cherry picked from commit fef7859f75eb501c305c2cd53c0c6ac00440db3b)
Copy link

centic9 has previously contributed to projects/apache-poi. The previous PR was #11107

@DavidKorczynski DavidKorczynski merged commit 56f58e2 into google:master Dec 29, 2023
16 checks passed
@centic9 centic9 deleted the apache_poi_improve_coverage_counting branch December 29, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants