This repository was archived by the owner on Aug 3, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 workflow_dispatch :
99
1010jobs :
11+ source-audit :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+
17+ - name : Audit production sources
18+ run : |
19+ if rg -n '\bthrow\b|std::abort\(' src; then
20+ echo "Embedded safety audit failed"
21+ exit 1
22+ fi
23+
1124 build-examples :
1225 runs-on : ubuntu-latest
26+ needs : source-audit
1327 strategy :
1428 fail-fast : false
1529 matrix :
Original file line number Diff line number Diff line change 3737 ],
3838 "build" : {
3939 "flags" : [
40- " -std=gnu++17"
40+ " -std=gnu++17" ,
41+ " -fno-exceptions"
4142 ]
4243 }
4344}
Original file line number Diff line number Diff line change @@ -53,20 +53,12 @@ template <typename T> class DateAllocator {
5353 return nullptr ;
5454 }
5555 if (n > (std::numeric_limits<std::size_t >::max () / sizeof (T))) {
56- #if defined(__cpp_exceptions)
57- throw std::bad_alloc ();
58- #else
59- std::abort ();
60- #endif
56+ return nullptr ;
6157 }
6258
6359 void *memory = date_allocator_detail::allocate (n * sizeof (T), usePSRAMBuffers_);
6460 if (memory == nullptr ) {
65- #if defined(__cpp_exceptions)
66- throw std::bad_alloc ();
67- #else
68- std::abort ();
69- #endif
61+ return nullptr ;
7062 }
7163 return static_cast <T *>(memory);
7264 }
You can’t perform that action at this time.
0 commit comments