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

Initialize scala.util.control.NonFatal in Builder #4195

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions core/src/main/scala/chisel3/internal/Builder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,12 @@ private[chisel3] object Builder extends LazyLogging {
dynamicContext: DynamicContext
): (Circuit, T) = {
dynamicContextVar.withValue(Some(dynamicContext)) {
ViewParent: Unit // Must initialize the singleton in a Builder context or weird things can happen
// in tiny designs/testcases that never access anything in chisel3.internal
// Must initialize the singleton in a Builder context or weird things can happen
// in tiny designs/testcases that never access anything in chisel3.internal.
ViewParent: Unit
// Must initialize the singleton or OutOfMemoryErrors and StackOverflowErrors will instead report as
// "java.lang.NoClassDefFoundError: Could not initialize class scala.util.control.NonFatal$".
scala.util.control.NonFatal: Unit
logger.info("Elaborating design...")
val mod =
try {
Expand Down
Loading