You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Mandelbrot JitBuilder sample [1] currently uses fprintf to encode the PPM header on z/OS. This is problematic because literal strings on z/OS are encoded as EBCDIC, and this we end up with an invalid PPM header which renders the image invalid when attempting to view.
We should use the port library to encode this string as ASCII in a portable way on all platforms.
Note that this file (Mandelbrot.cpp) is not really built against the full OMR project, though I agree in principle with using the port library as an attractive way to address the problem. The code samples are meant to stand by themselves (with the unfortunate side effect you discovered for this particular sample).
Other options could be to have a zOS specific version of this particular sample, or to just to include the appropriate #ifdef'd code into the code sample. The second is probably preferable, but I'm open to other solutions / positions.
The Mandelbrot JitBuilder sample [1] currently uses
fprintf
to encode the PPM header on z/OS. This is problematic because literal strings on z/OS are encoded as EBCDIC, and this we end up with an invalid PPM header which renders the image invalid when attempting to view.We should use the port library to encode this string as ASCII in a portable way on all platforms.
[1] https://github.com/eclipse/omr/blob/6328141a215e35978ebed7dad1e9ba73cca4484f/jitbuilder/release/cpp/samples/Mandelbrot.cpp#L343
The text was updated successfully, but these errors were encountered: