René's URL Explorer Experiment


Title: Bug in com.sun.java.help.search.BitSet.java leads to a long trail of exceptions · Issue #38 · javaee/javahelp · GitHub

Open Graph Title: Bug in com.sun.java.help.search.BitSet.java leads to a long trail of exceptions · Issue #38 · javaee/javahelp

X Title: Bug in com.sun.java.help.search.BitSet.java leads to a long trail of exceptions · Issue #38 · javaee/javahelp

Description: Our organization uses JavaHelp for packaging our help documentation for our product. We've noticed that at some point when a very large file was being indexed via jhindexer, a number of IOExceptions were generated: java.io.IOException: C...

Open Graph Description: Our organization uses JavaHelp for packaging our help documentation for our product. We've noticed that at some point when a very large file was being indexed via jhindexer, a number of IOException...

X Description: Our organization uses JavaHelp for packaging our help documentation for our product. We've noticed that at some point when a very large file was being indexed via jhindexer, a number of IOExcep...

Opengraph URL: https://github.com/javaee/javahelp/issues/38

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug in com.sun.java.help.search.BitSet.java leads to a long trail of exceptions","articleBody":"Our organization uses JavaHelp for packaging our help documentation for our product. We've noticed that at some point when a very large file was being indexed via jhindexer, a number of IOExceptions were generated:\n\njava.io.IOException: Can't store Document\nat com.sun.java.help.search.DefaultIndexerKit.storeToken(DefaultIndexerKit.java:164)\nat com.sun.java.help.search.DefaultIndexerKit.parseIntoTokens(DefaultIndexerKit.java:117)\nat com.sun.java.help.search.HTMLIndexerKit$HTMLParserCallback.addContent(HTMLIndexerKit.java:1092)\nat com.sun.java.help.search.HTMLIndexerKit$HTMLParserCallback.addContent(HTMLIndexerKit.java:1064)\nat com.sun.java.help.search.HTMLIndexerKit$HTMLParserCallback.handleText(HTMLIndexerKit.java:411)\nat javax.swing.text.html.parser.DocumentParser.handleText(DocumentParser.java:241)\nat javax.swing.text.html.parser.Parser.handleText(Parser.java:345)\nat javax.swing.text.html.parser.Parser.endTag(Parser.java:427)\nat javax.swing.text.html.parser.Parser.parseTag(Parser.java:1804)\nat javax.swing.text.html.parser.Parser.parseContent(Parser.java:2044)\nat javax.swing.text.html.parser.Parser.parse(Parser.java:2211)\nat javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:105)\nat javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:73)\nat com.sun.java.help.search.HTMLIndexerKit.parse(HTMLIndexerKit.java:116)\nat com.sun.java.help.search.Indexer.parseFile(Indexer.java:259)\nat com.sun.java.help.search.Indexer.compile(Indexer.java:219)\nat com.sun.java.help.search.Indexer.main(Indexer.java:87)\n\nUsing the source available from subversion, we've localized the issue to a very subtle bug in com.sun.java.help.search.BitSet.concatenate():\n\n162\\. int tp = _free - 1; // target\n163\\. int sp = 0; // source\n164\\. do\n\n{ 165\\. _array[tp++] |= bb._array[sp] \u003e\u003e\u003e (NBits - _avail); 166\\. _array[tp] = bb._array[sp++] \u003c\u003c _avail; 167\\. }\n\n168\\. while (sp \u003c bb._free);\n\nThis can lead to an ArrayIndexOutOfBoundsException when the _free index for the incoming BitBuffer is outside the bounds of the target BitBuffer. We're not sure how the length of the file affects this result, but we did create the following test case to confirm:\n\n(1) Change the initial array size to 3 (instead of 256, to avoid the need for filling up one buffer with 256 words).\n(2) Define a static main method as follows:\n\npublic static void main (String[] args)\n{\n/* Instantiate both buffers. Note that both buffers can contain up to 96 bits (3 words * 32 bits per word) */\nBitBuffer target = new BitBuffer(), source = new BitBuffer();\n\n/* Add 8 bits to target – this changes the number of available bits and changes the _free index */\ntarget.append(0xAA, 8);\n\n/* Add 72 bits to source */\nsource.append(0x11223344, 32);\nsource.append(0x55667788, 32);\nsource.append(0x99, 8);\n\n/* Note here that target has enough room to consume all bits in source (72 + 8 \u003c 96),\nso the target buffer will not be resized in concatenate () */\n\n/* Flush outstanding bits in both buffers to array */\ntarget.close();\nsource.close();\n\n/* Invoke concatenate () and take note of the ArrayIndexOutOfBoundsException */\ntarget.concatenate(source);\n}\n\nWe believe the issue can be fixed by counting the number of remaining bits instead of watching the word pointer in the do-while loop:\n\n162\\. int tp = _free - 1; // target\n163\\. int sp = 0; // source\n164\\. int remaining = bb.bitCount(); // \u003c-- Begin with all bits in source remaining\n165\\. do {\n166\\. _array[tp++] |= bb._array[sp] \u003e\u003e\u003e (NBits - _avail);\n167\\. remaining = _avail; // \u003c- Deduct bits added to target from remaining\n168\\. if (remaining \u003e 0) // \u003c-- Are there bits remaining after the move?\n169\\.\n\n{ 170\\. _array[tp] = bb._array[sp++] \u003c\u003c _avail; 171\\. remaining -= NBits - _avail; // \u003c-- Deduct bits added to target 172\\. }\n\n173\\. }\n174\\. while (remaining \u003e 0); // Do this while there are bits remaining\n\nWe made this change and rebuilt the JavaHelp project, but making this change seems to have led to yet another exception:\n\njava.lang.ArrayIndexOutOfBoundsException: 17\nat com.sun.java.help.search.Decompressor.ascendingDecode(Decompressor.java:176)\nat com.sun.java.help.search.DocumentLists$MicroIndex.next(DocumentLists.java:105)\nat com.sun.java.help.search.DocumentLists$MicroIndex.openDocumentIndex(DocumentLists.java:137)\nat com.sun.java.help.search.DocumentLists$MicroIndex.\u003cinit\u003e(DocumentLists.java:79)\nat com.sun.java.help.search.DocumentLists.\u003cinit\u003e(DocumentLists.java:194)\nat com.sun.java.help.search.DocumentLists.invert(DocumentLists.java:270)\nat com.sun.java.help.search.DefaultIndexBuilder.close(DefaultIndexBuilder.java:130)\nat com.sun.java.help.search.Indexer.compile(Indexer.java:242)\nat com.sun.java.help.search.Indexer.main(Indexer.java:87)\n\nWith this exception, the index is not properly built, and so we rolled back our change in BitBuffer.java.\n\nIs there any way this issue can be fixed? Is there any design documentation that we might use to determine how this library works? The software code itself is very scarcely commented, making it very difficult to compare the intended functionality with the actual behavior.\n#### Environment\nn/a\n#### Affected Versions\n[current]","author":{"url":"https://github.com/glassfishrobot","@type":"Person","name":"glassfishrobot"},"datePublished":"2012-08-31T14:26:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/38/javahelp/issues/38"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c0af22e1-c48a-01ff-602b-3e88adb0128f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9A54:24CD64:1D7CA32:2717D5E:696AFF91
html-safe-nonce8e0b32cdd878506db548ef8d413f7da4b3a1c7779f4342b8835e380836d4b2d0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTU0OjI0Q0Q2NDoxRDdDQTMyOjI3MTdENUU6Njk2QUZGOTEiLCJ2aXNpdG9yX2lkIjoiMzAzODI5NzQyNjQ0ODAyMzQ0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace9f56da0f7e242f35a18c4ca98c64461b9748e61c78bab18338c576b638e5d97
hovercard-subject-tagissue:224363726
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javaee/javahelp/38/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a7549ffca25d0dbb34846c24710dddaf26226b83238dac428192629bf96aa68b/javaee/javahelp/issues/38
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a7549ffca25d0dbb34846c24710dddaf26226b83238dac428192629bf96aa68b/javaee/javahelp/issues/38
og:image:altOur organization uses JavaHelp for packaging our help documentation for our product. We've noticed that at some point when a very large file was being indexed via jhindexer, a number of IOException...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameglassfishrobot
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/javaee/javahelp git https://github.com/javaee/javahelp.git
octolytics-dimension-user_id23086798
octolytics-dimension-user_loginjavaee
octolytics-dimension-repository_id89311664
octolytics-dimension-repository_nwojavaee/javahelp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id89311664
octolytics-dimension-repository_network_root_nwojavaee/javahelp
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/javaee/javahelp/issues/38#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavaee%2Fjavahelp%2Fissues%2F38
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavaee%2Fjavahelp%2Fissues%2F38
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=javaee%2Fjavahelp
Reloadhttps://github.com/javaee/javahelp/issues/38
Reloadhttps://github.com/javaee/javahelp/issues/38
Reloadhttps://github.com/javaee/javahelp/issues/38
javaee https://github.com/javaee
javahelphttps://github.com/javaee/javahelp
Notifications https://github.com/login?return_to=%2Fjavaee%2Fjavahelp
Fork 14 https://github.com/login?return_to=%2Fjavaee%2Fjavahelp
Star 15 https://github.com/login?return_to=%2Fjavaee%2Fjavahelp
Code https://github.com/javaee/javahelp
Issues 40 https://github.com/javaee/javahelp/issues
Pull requests 0 https://github.com/javaee/javahelp/pulls
Actions https://github.com/javaee/javahelp/actions
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/javaee/javahelp/security
Please reload this pagehttps://github.com/javaee/javahelp/issues/38
Insights https://github.com/javaee/javahelp/pulse
Code https://github.com/javaee/javahelp
Issues https://github.com/javaee/javahelp/issues
Pull requests https://github.com/javaee/javahelp/pulls
Actions https://github.com/javaee/javahelp/actions
Security https://github.com/javaee/javahelp/security
Insights https://github.com/javaee/javahelp/pulse
Bug in com.sun.java.help.search.BitSet.java leads to a long trail of exceptionshttps://github.com/javaee/javahelp/issues/38#top
https://github.com/glassfishrobot
Priority: Majorhttps://github.com/javaee/javahelp/issues?q=state%3Aopen%20label%3A%22Priority%3A%20Major%22
Type: Bughttps://github.com/javaee/javahelp/issues?q=state%3Aopen%20label%3A%22Type%3A%20Bug%22
https://github.com/glassfishrobot
https://github.com/glassfishrobot
glassfishrobothttps://github.com/glassfishrobot
on Aug 31, 2012https://github.com/javaee/javahelp/issues/38#issue-224363726
glassfishrobothttps://github.com/glassfishrobot
Priority: Majorhttps://github.com/javaee/javahelp/issues?q=state%3Aopen%20label%3A%22Priority%3A%20Major%22
Type: Bughttps://github.com/javaee/javahelp/issues?q=state%3Aopen%20label%3A%22Type%3A%20Bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.