# The variant you qualify

Several ECUs can share one repository. Context is the image you certify.

[Book a demo](https://byteask.cal.com/pratyush/book-a-demo) [See the evidence](https://byteask.ai/industries/automotive#evidence)

## The build gives the context

ByteAsk Context indexes the functions and calls your compile commands select. The examples below show what was captured for this domain.

The problem

Several ECU variants can share one tree. The image is whichever variant the compile commands build

This recording

No variant is resolved. The session is a C++ market-data service, not an ECU

The AUTOSAR rule further down is a separate lookup. The session quotes a C++ Core Guidelines line.

[How ByteAsk Context works](https://byteask.ai/context)

## Checks from a recorded C++ session

A C++ market-data service, not an ECU. Guideline lookup, then those two checks. The AUTOSAR quote below is separate.

cppcheck runs on the project. clang-tidy runs on bench/shard_replay.cpp.

```
tool: autosar_ref started
> If you don't share writable data, you can't have a data race.
tool: cpp_check started
🔧 cpp_check · .
No findings.
tool: cpp_tidy (completed in 1085ms)
No findings.
```

Recorded 2026-09-11.

Read the full captured excerpt

```
tool: autosar_ref started
{"query":"C++ Core Guidelines CP.3 minimize explicit sharing of writable data","limit":3}
tool: autosar_ref (completed in 6254ms)
📚 autosar_ref · C++ Core Guidelines CP.3 minimize explicit sharing of wr…
> If you don't share writable data, you can't have a data race.
tool: cpp_check started
{"path":".","timeout_sec":300,"use_compile_db":true}
tool: cpp_check (completed in 29ms)
🔧 cpp_check · .
No findings.
tool: cpp_tidy started
{"path":"bench/shard_replay.cpp","build_dir":"."}
tool: cpp_tidy (completed in 1085ms)
🔧 cpp_tidy · bench/shard_replay.cpp
No findings.
```

## The source behind the answer

AUTOSAR Guidelines for the Use of the C++14 Language in Critical and Safety-Related Systems (AP Release 18-10)
§A18-5-1 required, implementation, automated · p.344

> Rule A18-5-1 (required, implementation, automated) Functions malloc, calloc, realloc and free shall not be used. Rationale C-style allocation/deallocation using malloc/calloc/realloc/free functions is not type safe and does not invoke class’s constructors and destructors.

Retrieved with `search_docs` on 2026-10-26. This document lookup is separate from the recorded session above.

## On your build

[Book a demo](https://byteask.cal.com/pratyush/book-a-demo)

[On-prem and air-gapped](https://byteask.ai/enterprise)

---
HTML version: https://byteask.ai/industries/automotive
