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

Bun index out of bounds error when used with aws cdk #11006

Closed
NimmLor opened this issue May 11, 2024 · 2 comments
Closed

Bun index out of bounds error when used with aws cdk #11006

NimmLor opened this issue May 11, 2024 · 2 comments
Labels
bug Something isn't working crash An issue that could cause a crash

Comments

@NimmLor
Copy link

NimmLor commented May 11, 2024

How can we reproduce the crash?

Bun v1.1.8 on Windows using Powershell.

  1. Setup a simple cdk project

  2. Run bunx cdk synth ./bin/infrastructure.ts
    Note: adding the --bun flag adds a CDK warning that CDK is not tested with the given node version (defaults to the latest even though its not installed)

JavaScript/TypeScript code that reproduces the crash?

import { App, CfnOutput, Stack, type StackProps } from 'aws-cdk-lib'
import type { Construct } from 'constructs'

class SampleStack extends Stack {
  public constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props)

    new CfnOutput(this, 'Hello', {
      value: 'world',
    })
  }
}

const app = new App()
new SampleStack(app, 'InfrastructureStack', {})

Relevant log output

bunx cdk synth .\bin\infrastructure.ts      
============================================================
Bun v1.1.8 (89d25807) Windows x64
Args: "bun", "bin/infrastructure.ts"
Features: jsc transpiler_cache(4) tsconfig(5) 
Builtins: "bun:main" "node:buffer" "node:constants" "node:crypto" "node:fs" "node:path" "node:stream" "node:string_decoder" "node:util" "node:util/types" 
Elapsed: 972ms | User: 218ms | Sys: 31ms
RSS: 1.01GB | Peak: 1.01GB | Commit: 1.45GB | Faults: 249498

panic(main thread): index out of bounds
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Stack Trace (bun.report)

Bun v1.1.8 (89d2580) on windows x86_64 [AutoCommand]

panic: index out of bounds

@NimmLor NimmLor added bug Something isn't working crash An issue that could cause a crash labels May 11, 2024
@Jarred-Sumner
Copy link
Collaborator

Duplicate of #5398

@Jarred-Sumner Jarred-Sumner marked this as a duplicate of #5398 May 12, 2024
@Jarred-Sumner
Copy link
Collaborator

Closing as duplicate of #5398. Please follow along there. We will fix it.

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash An issue that could cause a crash
Projects
None yet
Development

No branches or pull requests

2 participants