Git 'hooks/': UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 2766: invalid start byte

Thomas Schwinge
Thu Feb 16 12:26:09 GMT 2023


The following is not an actual problem for me or GCC/Rust; just for your

I've just pushed to GCC devel/rust/master branch
Git commits cc23831ec66..74913f718b0, which 'hooks/' threw
up upon:

    $ git push upstream github/Rust-GCC/gccrs/master:devel/rust/master
    Enumerating objects: 326, done.
    Counting objects: 100% (326/326), done.
    Delta compression using up to 12 threads
    Compressing objects: 100% (143/143), done.
    Writing objects: 100% (224/224), 32.72 KiB | 6.54 MiB/s, done.
    Total 224 (delta 191), reused 106 (delta 79)
    remote: Resolving deltas: 100% (191/191), completed with 86 local objects.
    remote: Traceback (most recent call last):
    remote:   File "hooks/", line 118, in <module>
    remote:     post_receive(refs_data, args.submitter_email)
    remote:   File "hooks/", line 65, in post_receive
    remote:     submitter_email)
    remote:   File "hooks/", line 47, in post_receive_one
    remote:     update.send_email_notifications()
    remote:   File "/sourceware1/projects/src-home/git-hooks/hooks/updates/", line 189, in send_email_notifications
    remote:     self.__email_new_commits()
    remote:   File "/sourceware1/projects/src-home/git-hooks/hooks/updates/", line 1031, in __email_new_commits
    remote:     commit, self.get_standard_commit_email(commit))
    remote:   File "/sourceware1/projects/src-home/git-hooks/hooks/updates/", line 1011, in __send_commit_email
    remote:     default_diff=email.diff)
    remote:   File "/sourceware1/projects/src-home/git-hooks/hooks/updates/", line 946, in __maybe_get_email_custom_contents
    remote:     hook_input=json.dumps(hooks_data),
    remote:   File "/usr/lib64/python2.7/json/", line 244, in dumps
    remote:     return _default_encoder.encode(obj)
    remote:   File "/usr/lib64/python2.7/json/", line 207, in encode
    remote:     chunks = self.iterencode(o, _one_shot=True)
    remote:   File "/usr/lib64/python2.7/json/", line 270, in iterencode
    remote:     return _iterencode(o, 0)
    remote: UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 2766: invalid start byte
    To git+ssh://
       cc23831ec66..74913f718b0  github/Rust-GCC/gccrs/master -> devel/rust/master

I very much suppose this "byte 0xff" is
commit 92d6dc8443acbd273333cab411bfd68eaca56a89
"Implemented UTF-8 checking for include_str!()" adding

    $ od -x gcc/testsuite/rust/compile/invalid_utf8
    0000000 0aff

Due to that (I suppose), Git commit emails to <> have
not been sent.

Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

More information about the Gcc mailing list