Bug 32077 - gas garbles multibyte UTF-8 characters in listing on long lines
Summary: gas garbles multibyte UTF-8 characters in listing on long lines
Status: UNCONFIRMED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.40
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-12 19:35 UTC by Joerg Wunsch
Modified: 2024-08-12 19:35 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Test case source code file (166 bytes, text/plain)
2024-08-12 19:35 UTC, Joerg Wunsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Wunsch 2024-08-12 19:35:57 UTC
Created attachment 15667 [details]
Test case source code file

When long (e.g. comment) lines contain multibyte UTF-8 characters, gas arbitrarily cuts them off at the line length limit, irrespective of whether the current chacters is within a multibyte sequence.

This generates listing files with invalid characters.

The test case file generates the following:

   3              		# This is a very lengthy comment that contains lots of strange characters xツア邃「竇昶慊」竇慊、竇
   4              		# This is a very lengthy comment that contains lots of strange characters xツア邃「竇昶慊」竇慊、竇