[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #17161 [Tor]: Conform to C++ Core Guidelines for C?
#17161: Conform to C++ Core Guidelines for C?
-------------------------------------------------+-------------------------
Reporter: mikeperry | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Tor | Version:
Keywords: 028-triage security flamewar | Actual Points:
holywar jihad Coup++ seriously-not-trolling- | Points:
xkeyscore |
Parent ID: |
-------------------------------------------------+-------------------------
Every so often we daydream about a Tor reimplementation in a memory-safe
language (Java, Javascript, Golang, Rust, etc). Several of these have even
been attempted.
However, it seems as though the C++ community wants to join the club. They
are working on machine-enforceable subset of C++ that is meant to be
safe(r) and fast:
https://isocpp.org/blog/2015/09/bjarne-stroustrup-announces-cpp-core-
guidelines
At minimum, it seems as though we should conform to this rule:
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md
#Rcpl-subset
There's a ton of things in the tor source code like "int private", "static
char zeroes[32];", bad autoconf tests, and so on that prevent tor from
even compiling with a C++ compiler. We should fix these, even if we we're
not ready to accept C++ code in tor.
We should also discuss what we think about eventually allowing pieces of
tor to be written in C++ (if nothing else for access to STL data
structures and RAII), especially if the C++ Core Guidelines effort ends up
producing something that does end up having safety properties that can be
enforced by the compiler.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17161>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs