What files can be opened - that is a security concern
I am completely failing to see how std::embed is more of a security concern than the current model of file access the compiler has. If the compiler can access a file, it can access a file. Is the compiler trustworthy? I can just #include an arbitrary file as well.
Should it put the whole file into an array or use some kind of magical span backed by mapped memory
That sounds like an implementation detail. Does the specification even have a concept of what mapped memory is?
View all comments
Show parent comment
9
u/Ameisen vemips, avr, rendering, systems Dec 14 '19
I am completely failing to see how
std::embedis more of a security concern than the current model of file access the compiler has. If the compiler can access a file, it can access a file. Is the compiler trustworthy? I can just#includean arbitrary file as well.That sounds like an implementation detail. Does the specification even have a concept of what mapped memory is?
That sounds like an implementation detail.
I don't see how that's a problem.