FILE here;
memcmp(&here, file, sizeof(file));
/* This will seg-fault. */
fprintf(&here, "Hello world!\n");
Yes. This is not the right forum to ask about dubious C programs.
It has nothing to do with the kernel.
But let me quote a fragment of my old draft C standard -
the numbering or text may differ these days:
4.9.3. Files ...
The address of the FILE object used to control a stream may be significant;
a copy of a FILE object may not necessarily serve in place of the original.
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/