Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder what sort of code it is that it's that many lines. Is it lookup tables, or real-deal code?


It's probably mostly real code, though cars certainly do use plenty of lookup tables, starting from one of the earlier uses of computers in cars, the engine control unit.

Modern cars have tons of things needing code:

  Power seats with memory
  Drive by wire gas pedal and cruise control
  Keyless entry
  Stereo system (auto volume by speed, etc.)
  GPS/Navigation (perhaps third-party)
  USB outlets for iPods, USB sticks for music
  Reverse-gear proximity sensors
  Emissions controls (oops!)
  OnStar-type services
  Cellular phone integration, e.g. mute on ring
  Lighting (DRL, smart cabin dimming)
  Traction control and ABS
  Variable suspension
  Dashboard diagnostics
  OBD-II
  Self-parking
  Windshield wipers (auto speed, rain sensors)
  Antitheft systems
I'm sure I've left out plenty, but even something "simple" like keyless entry has a lot of features (integration with OnStar, alarm system, reprogramming support for new remotes, ...). How many LOC do you think that entails? I imagine at least 100K LOC (keeping in mind it's likely written in C or similar).


Most of those are not part of the ECU code.


The E in ECU can mean Engine or Electronic. Which do you intend here?


You tell me. How is the answer not obvious in the current context?


Well the parent of the comment I first replied to said "Most estimates put the number of lines of code in a new car at near 100 million." I took that to mean total LOC in a car, not in an Engine Control Unit. But your comments to me suggest you are talking about an Engine Control Unit. Forgive me, but it is not obvious to me what you are on about.


I think the point is that if you're talking about finding malicious engine control activity, then talking about the number of lines of code for the entire car is irrelevant, because all that matters is the code for the engine control unit.


Most of these functions are not relevant to the discussion because they are not controlled by the ECU.


This article breaks it down a little better.

http://www.redbend.com/data/upl/whitepapers/red_bend_update_...

The biggest chunk is obviously the radio/nav system.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: