Skip to content

fix(rust): avoid panic when assetFileNames hash length exceeds 22#4019

Merged
shulaoda merged 3 commits intomainfrom
04-04-fix/avoid-panic-when-assetFileNames-hash-length-exceeds-22
Apr 7, 2025
Merged

fix(rust): avoid panic when assetFileNames hash length exceeds 22#4019
shulaoda merged 3 commits intomainfrom
04-04-fix/avoid-panic-when-assetFileNames-hash-length-exceeds-22

Conversation

@shulaoda
Copy link
Member

@shulaoda shulaoda commented Apr 4, 2025

Description

closes #4016

I will improve the related test cases based on #3761 in a follow-up.

@netlify
Copy link

netlify bot commented Apr 4, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit f011e55
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/67f32b8b2baed800088d004d

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2025

Benchmarks Rust

  • target: main(b7224c1)
  • pr: 04-04-fix/avoid-panic-when-assetFileNames-hash-length-exceeds-22(f011e55)
group                                                               pr                                     target
-----                                                               --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol                     1.04     79.5±1.78ms        ? ?/sec    1.00     76.4±2.51ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify              1.08    105.0±3.22ms        ? ?/sec    1.00     97.5±3.74ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify-sourcemap    1.03    114.0±2.26ms        ? ?/sec    1.00    110.4±1.58ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap           1.07     92.2±2.11ms        ? ?/sec    1.00     85.8±2.61ms        ? ?/sec
bundle/bundle@rome-ts                                               1.00    126.9±2.58ms        ? ?/sec    1.00    126.4±2.73ms        ? ?/sec
bundle/bundle@rome-ts-minify                                        1.05    221.3±7.08ms        ? ?/sec    1.00    210.8±4.92ms        ? ?/sec
bundle/bundle@rome-ts-minify-sourcemap                              1.07    261.0±9.07ms        ? ?/sec    1.00    245.1±4.62ms        ? ?/sec
bundle/bundle@rome-ts-sourcemap                                     1.00    140.9±2.42ms        ? ?/sec    1.00    141.4±2.07ms        ? ?/sec
bundle/bundle@threejs                                               1.04     45.1±0.80ms        ? ?/sec    1.00     43.2±1.10ms        ? ?/sec
bundle/bundle@threejs-minify                                        1.08     95.2±2.67ms        ? ?/sec    1.00     88.5±1.98ms        ? ?/sec
bundle/bundle@threejs-minify-sourcemap                              1.05    109.7±1.35ms        ? ?/sec    1.00    105.0±1.57ms        ? ?/sec
bundle/bundle@threejs-sourcemap                                     1.04     51.5±0.50ms        ? ?/sec    1.00     49.3±0.43ms        ? ?/sec
bundle/bundle@threejs10x                                            1.03    447.0±4.59ms        ? ?/sec    1.00    435.2±7.84ms        ? ?/sec
bundle/bundle@threejs10x-minify                                     1.02   1114.2±5.90ms        ? ?/sec    1.00   1087.8±4.85ms        ? ?/sec
bundle/bundle@threejs10x-minify-sourcemap                           1.01  1289.4±16.69ms        ? ?/sec    1.00  1274.4±10.52ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                                  1.03   529.9±16.93ms        ? ?/sec    1.00    513.4±7.56ms        ? ?/sec
remapping/remapping                                                 1.07     26.8±0.28ms        ? ?/sec    1.00     25.0±0.28ms        ? ?/sec
remapping/render-chunk-remapping                                    1.03     72.3±5.09ms        ? ?/sec    1.00     70.3±5.59ms        ? ?/sec
scan/scan@rome-ts                                                   1.00     99.3±1.64ms        ? ?/sec    1.01    100.8±1.78ms        ? ?/sec
scan/scan@threejs                                                   1.01     32.8±0.71ms        ? ?/sec    1.00     32.7±1.19ms        ? ?/sec
scan/scan@threejs10x                                                1.01    326.6±4.20ms        ? ?/sec    1.00    323.1±3.42ms        ? ?/sec

@IWANABETHATGUY
Copy link
Member

Please add a test case

@shulaoda shulaoda marked this pull request as draft April 6, 2025 07:36
@shulaoda shulaoda force-pushed the 04-04-fix/avoid-panic-when-assetFileNames-hash-length-exceeds-22 branch from 800a653 to 1282462 Compare April 7, 2025 01:31
@shulaoda shulaoda force-pushed the 04-04-fix/avoid-panic-when-assetFileNames-hash-length-exceeds-22 branch from 58e0db6 to f011e55 Compare April 7, 2025 01:34
@shulaoda shulaoda marked this pull request as ready for review April 7, 2025 01:43
@shulaoda shulaoda requested a review from IWANABETHATGUY April 7, 2025 05:25
@shulaoda shulaoda added this pull request to the merge queue Apr 7, 2025
Merged via the queue into main with commit 86710df Apr 7, 2025
28 checks passed
@shulaoda shulaoda deleted the 04-04-fix/avoid-panic-when-assetFileNames-hash-length-exceeds-22 branch April 7, 2025 11:18
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.

[Bug]: an asset file name with [hash:23] panics rolldown

2 participants