Title: OutOfMemoryError on formating file with no actual code · Issue #413 · google/google-java-format · GitHub
Open Graph Title: OutOfMemoryError on formating file with no actual code · Issue #413 · google/google-java-format
X Title: OutOfMemoryError on formating file with no actual code · Issue #413 · google/google-java-format
Description: Hi, seems like I found an indentation bomb. Happend to try to format OdfManifestSaxHandler.java (Rev: 1869391) and always failed with OutOfMemoryError (tried up to 12G of heap space). Original file is 6 kB. Output of formatter would be a...
Open Graph Description: Hi, seems like I found an indentation bomb. Happend to try to format OdfManifestSaxHandler.java (Rev: 1869391) and always failed with OutOfMemoryError (tried up to 12G of heap space). Original file...
X Description: Hi, seems like I found an indentation bomb. Happend to try to format OdfManifestSaxHandler.java (Rev: 1869391) and always failed with OutOfMemoryError (tried up to 12G of heap space). Original file...
Opengraph URL: https://github.com/google/google-java-format/issues/413
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"OutOfMemoryError on formating file with no actual code","articleBody":"Hi,\r\n\r\nseems like I found an indentation bomb. Happend to try to format [OdfManifestSaxHandler.java](http://svn.apache.org/repos/asf/incubator/odf/trunk/odfdom/src/main/java/org/odftoolkit/odfdom/pkg/OdfManifestSaxHandler.java) (Rev: 1869391) and always failed with OutOfMemoryError (tried up to 12G of heap space).\r\nOriginal file is 6 kB. Output of formatter would be approximately 3 GB. Smaller test case which could be handled would be \r\n\r\nInput:\r\n```/*\r\nclass X {\r\n\t*//** javadoc *//*\r\n\tpublic void foo(Bar bar) {}\r\n\r\n\t*//** javadoc *//*\r\n\tpublic void foo(Bar bar) {}\r\n\r\n\t*//** javadoc *//*\r\n\tpublic void foo(Bar bar) {}\r\n\r\n\t*//** javadoc *//*\r\n\tpublic void foo(Bar bar) {}\r\n}*/\r\n```\r\n\r\nOutput (each # represents 100 space characters):\r\n```/*\r\nclass X {\r\n\t*//** javadoc *//*\r\n public void foo(Bar bar) {}\r\n\r\n *//** javadoc *//*\r\n public void foo(Bar bar) {}\r\n\r\n *//**\r\n# * javadoc\r\n# *//*\r\n## public void foo(Bar bar) {}\r\n\r\n## *//**\r\n#### * javadoc\r\n#### *//*\r\n######## \tpublic void foo(Bar bar) {}\r\n######## }*/\r\n```","author":{"url":"https://github.com/Eckaaaaaat","@type":"Person","name":"Eckaaaaaat"},"datePublished":"2019-11-05T14:01:24Z","url":"https://github.com/google/google-java-format/issues/413"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b0063ada-8147-50b1-dce9-2a0e601f8fe5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E8FE:143B19:60E4F2:807022:6AFBC828 |
| html-safe-nonce | 72b7c97e3e2c8c581e9583153f523d177cd82f2d502fc67cb160f6c1ee3fe9d5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEZFOjE0M0IxOTo2MEU0RjI6ODA3MDIyOjZBRkJDODI4IiwidmlzaXRvcl9pZCI6IjUzMDQ4OTE2ODQ1MDczMzg3OTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 414a8ec9f00ba90144f60002cbebd5c43f8694414de2c75d2bafa7b3ed6ecd45 |
| hovercard-subject-tag | issue:517791227 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/google/google-java-format/413/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dce01705dea159f806147f6f1c3cbfb3a5bd33a61268ea6a612b3305cd845f6c/google/google-java-format/issues/413 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dce01705dea159f806147f6f1c3cbfb3a5bd33a61268ea6a612b3305cd845f6c/google/google-java-format/issues/413 |
| og:image:alt | Hi, seems like I found an indentation bomb. Happend to try to format OdfManifestSaxHandler.java (Rev: 1869391) and always failed with OutOfMemoryError (tried up to 12G of heap space). Original file... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Eckaaaaaat |
| hostname | github.com |
| expected-hostname | github.com |
| None | d440bda0d812801778b27bfe9f7c1ce9ff22420c73f6f95150c4fcbca311c50b |
| turbo-cache-control | no-preview |
| go-import | github.com/google/google-java-format git https://github.com/google/google-java-format.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 35448780 |
| octolytics-dimension-repository_nwo | google/google-java-format |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 35448780 |
| octolytics-dimension-repository_network_root_nwo | google/google-java-format |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2c43021aed8695990c86c0eaaedc600bfeffec36 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width