Missing NULL check

jacob navia jacob@jacob.remcomp.fr
Wed Sep 13 14:28:12 GMT 2023


> 
> I share the same opinion as Torbjorn's.
> 
> You might consider configuring  `git send-email` with a MTA (e.g.
> msmtp), then you can send [PATCH] messages that a maintainer can apply
> with ease:
> 
>    b4 am 'https://inbox.sourceware.org/binutils/DB9PR08MB647413BBA3340351A802035F81F1A@DB9PR08MB6474.eurprd08.prod.outlook.com/T/#t'
> -o - | git am
> 
> (See https://josefbacik.github.io/kernel/2021/10/18/lei-and-b4.html)
> 
> If a patch is straightforward enough and a maintainer notices it, I am
> sure this will make it faster for a fix to be applied.

This looks easy for linux wizards… I am not. I am just trying to help.
1) I downloaded and installed smtp
2) Download and installed the « b4 » thing.
3) Downloaded and installed a fresh copy of binutils-gdb
4) Made the change for fixing missing NULL tests.
5) Committed my changes to git
6) After a lot of fiddling I did the command that you sent me:
 b4 am 'https://inbox.sourceware.org/binutils/DB9PR08MB647413BBA3340351A802035F81F1A@DB9PR08MB6474.eurprd08.prod.outlook.com/T/#t'
-o - | git am
It was splitter somewhere, did not work the first few times until I got that right.
7) OUTPUT:
sipeed@lpi4a:~/binutils-gdb/bfd$  b4 am 'https://inbox.sourceware.org/binutils/DB9PR08MB647413BBA3340351A802035F81F1A@DB9PR08MB6474.eurprd08.prod.outlook.com/T/#t' -o - | git am
Looking up https://inbox.sourceware.org/binutils/DB9PR08MB647413BBA3340351A802035F81F1A%40DB9PR08MB6474.eurprd08.prod.outlook.com
Grabbing thread from inbox.sourceware.org/binutils/DB9PR08MB647413BBA3340351A802035F81F1A%40DB9PR08MB6474.eurprd08.prod.outlook.com/t.mbox.gz
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 704, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 450, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
    httplib_response = conn.getresponse()
                       ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 1378, in getresponse
    response.begin()
  File "/usr/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 788, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 704, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 450, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
    httplib_response = conn.getresponse()
                       ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 1378, in getresponse
    response.begin()
  File "/usr/lib/python3.11/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/b4", line 33, in <module>
    sys.exit(load_entry_point('b4==0.12.2', 'console_scripts', 'b4')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/b4/command.py", line 360, in cmd
    cmdargs.func(cmdargs)
  File "/usr/lib/python3/dist-packages/b4/command.py", line 91, in cmd_am
    b4.mbox.main(cmdargs)
  File "/usr/lib/python3/dist-packages/b4/mbox.py", line 694, in main
    msgid, msgs = b4.retrieve_messages(cmdargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/b4/__init__.py", line 3538, in retrieve_messages
    msgs = get_pi_thread_by_msgid(msgid, nocache=cmdargs.nocache, onlymsgids=pickings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/b4/__init__.py", line 2843, in get_pi_thread_by_msgid
    msgs = get_pi_thread_by_url(t_mbx_url, nocache=nocache)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/b4/__init__.py", line 2800, in get_pi_thread_by_url
    resp = session.get(t_mbx_url)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 547, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
sipeed@lpi4a:~/binutils-gdb/bfd$ 

Look, I am not a linux wizard, nor a python wizard, and neither a git wizard. From the first lines the command seem to work since it says:
Grabbing thread from inbox.sourceware.org/binutils/DB9PR08MB647413BBA3340351A802035F81F1A%40DB9PR08MB6474.eurprd08.prod.outlook.com/t.mbox.gz <http://inbox.sourceware.org/binutils/DB9PR08MB647413BBA3340351A802035F81F1A%40DB9PR08MB6474.eurprd08.prod.outlook.com/t.mbox.gz>
Afterwards, please debug that yourself…




More information about the Binutils mailing list