commit | 83ade9254da4692d64befdd2a2930539c2d220fa | [log] [tgz] |
---|---|---|
author | Rupert Swarbrick <rswarbrick@lowrisc.org> | Thu Sep 09 15:31:50 2021 +0100 |
committer | Rupert Swarbrick <rswarbrick@gmail.com> | Mon Sep 13 11:29:06 2021 +0100 |
tree | 829f3cc975ef99c87a1e12c6cbcc7bee801bc7c5 | |
parent | 0746fead60d550021c2108fec1b1e195ecb0c26f [diff] |
[otbn,dv] Fix segfault when otbn_top_sim exited with failure The verilator_top.reset() line was only being run when we exited successfully. If not, we ended up destructing the std::unique_ptr and thus its contents somewhere inside the CRT's run_exit_handlers. It turns out that there's a race where a singleton in the Verilator library *must* exist when you run the constructor or destructor and you get a segfault if verilator_top happens to have a longer lifetime than the singleton. Fix things by being stupider: use a raw pointer to pass the object to OtbnTopApplyLoopWarp (the DPI function that needs it). This will be dangling after we exit main() and have destroyed the object, but we don't really care. Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
OpenTitan is an open source silicon Root of Trust (RoT) project. OpenTitan will make the silicon RoT design and implementation more transparent, trustworthy, and secure for enterprises, platform providers, and chip manufacturers. OpenTitan is administered by lowRISC CIC as a collaborative project to produce high quality, open IP for instantiation as a full-featured product. See the OpenTitan site and OpenTitan docs for more information about the project.
This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository. It exists to enable collaboration across partners participating in the OpenTitan project.
The project contains comprehensive documentation of all IPs and tools. You can access it online at docs.opentitan.org.
Have a look at CONTRIBUTING and our documentation on project organization and processes for guidelines on how to contribute code to this repository.
Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).