I am considering to include stack traces in teaching materials and was thus wondering whether they were copyrightable and if so, who would own the copyright and what would that entail to them and to whoever interacts with a copy of a stack trace. My assumption (as a non-lawyer) is that they are not copyrightable in any jurisdiction, but I'd like to know some more details.
Background: A stack trace is a representation of an exception or error that occurred when executing a computer program. Besides some hints as to the nature of the event, it also typically includes information about instructions from the computer program (or its dependencies) that were executed (or attempted) just before the event occurred.
The precise content of a stack trace (i.e. the expression in the copyright sense) depends on a range of technical parameters, which may include, for instance, aspects of the program itself, associated data, the programming language, the operating system or the hardware it runs on.
While things like random functions or CPU overheating can complicate the picture, a stack trace is essentially deterministic in a given set of circumstances, which probably means that copyright concepts like the creativity threshold would not be applicable to the stack trace as a whole, though there might be some room for them in things like names of variables or functions that appear in the stack trace.