GNU bug report logs - #23540
25.1.50; make-ipv4-tcp-server-with-unspecified-port fails

Previous Next

Package: emacs;

Reported by: Ken Brown <kbrown <at> cornell.edu>

Date: Sun, 15 May 2016 01:38:01 UTC

Severity: normal

Tags: fixed

Merged with 23508

Found in version 25.1.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23540 in the body.
You can then email your comments to 23540 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org:
bug#23540; Package emacs. (Sun, 15 May 2016 01:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Brown <kbrown <at> cornell.edu>:
New bug report received and forwarded. Copy sent to larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org. (Sun, 15 May 2016 01:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.50; make-ipv4-tcp-server-with-unspecified-port fails
Date: Sat, 14 May 2016 21:36:52 -0400
Commit b73e525, as corrected by commit 4639bc9, causes the test 
make-ipv4-tcp-server-with-unspecified-port in 
test/lisp/net/network-streams-tests.el to fail with the error

  Invalid argument 4 of operation `open-network-stream'.

What happens is that make-network-process calls 
set_network_socket_coding_system, which calls open-network-stream with 
service eq t, which leads to the error in a way that I haven't sorted out.


In GNU Emacs 25.1.50.6 (x86_64-unknown-cygwin, GTK+ Version 3.18.9)
 of 2016-05-14 built on moufang
Repository revision: b73e5254ea9056ee2088ed096ef1de3ef8699855
Windowing system distributor 'The Cygwin/X Project', version 11.0.11802000
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23540; Package emacs. (Sun, 15 May 2016 12:17:01 GMT) Full text and rfc822 format available.

Message #8 received at 23540 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: 23540 <at> debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port
 fails
Date: Sun, 15 May 2016 08:16:34 -0400
On 5/14/2016 9:36 PM, Ken Brown wrote:
> Commit b73e525, as corrected by commit 4639bc9, causes the test
> make-ipv4-tcp-server-with-unspecified-port in
> test/lisp/net/network-streams-tests.el to fail with the error
>
>   Invalid argument 4 of operation `open-network-stream'.
>
> What happens is that make-network-process calls
> set_network_socket_coding_system, which calls open-network-stream with
> service eq t, which leads to the error in a way that I haven't sorted out.

I didn't get that last step right.  The error is generated by 
Ffind_operation_coding_system when it is called by

CALLN (Ffind_operation_coding_system,
	Qopen_network_stream, name, p->buffer,
	host, service)

in set_network_socket_coding_system.

Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23540; Package emacs. (Sun, 15 May 2016 16:21:02 GMT) Full text and rfc822 format available.

Message #11 received at 23540 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: 23540 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#23540: 25.1.50;
 make-ipv4-tcp-server-with-unspecified-port fails
Date: Sun, 15 May 2016 19:15:22 +0300
> From: Ken Brown <kbrown <at> cornell.edu>
> Date: Sun, 15 May 2016 08:16:34 -0400
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>
> 
> On 5/14/2016 9:36 PM, Ken Brown wrote:
> > Commit b73e525, as corrected by commit 4639bc9, causes the test
> > make-ipv4-tcp-server-with-unspecified-port in
> > test/lisp/net/network-streams-tests.el to fail with the error
> >
> >   Invalid argument 4 of operation `open-network-stream'.
> >
> > What happens is that make-network-process calls
> > set_network_socket_coding_system, which calls open-network-stream with
> > service eq t, which leads to the error in a way that I haven't sorted out.
> 
> I didn't get that last step right.  The error is generated by 
> Ffind_operation_coding_system when it is called by
> 
> CALLN (Ffind_operation_coding_system,
> 	Qopen_network_stream, name, p->buffer,
> 	host, service)
> 
> in set_network_socket_coding_system.

Ffind_operation_coding_system includes an explicit test for the 4th
argument to be an integer:

  if (!(STRINGP (target)
	|| (EQ (operation, Qinsert_file_contents) && CONSP (target)
	    && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
	|| (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    error ("Invalid argument %"pI"d of operation `%s'",
	   XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));

This should obviously be augmented, now that the value can also be t.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23540; Package emacs. (Sun, 15 May 2016 17:09:03 GMT) Full text and rfc822 format available.

Message #14 received at 23540 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 23540 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port
 fails
Date: Sun, 15 May 2016 13:08:21 -0400
On 5/15/2016 12:15 PM, Eli Zaretskii wrote:
>> From: Ken Brown <kbrown <at> cornell.edu>
>> The error is generated by
>> Ffind_operation_coding_system when it is called by
>>
>> CALLN (Ffind_operation_coding_system,
>> 	Qopen_network_stream, name, p->buffer,
>> 	host, service)
>>
>> in set_network_socket_coding_system.
>
> Ffind_operation_coding_system includes an explicit test for the 4th
> argument to be an integer:
>
>   if (!(STRINGP (target)
> 	|| (EQ (operation, Qinsert_file_contents) && CONSP (target)
> 	    && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
> 	|| (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     error ("Invalid argument %"pI"d of operation `%s'",
> 	   XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
>
> This should obviously be augmented, now that the value can also be t.

Presumably the documentation of open-network-stream should also be 
updated to reflect this.  I hesitate to do this myself without knowing 
for sure that t is an acceptable value for all calls to 
open-network-stream.  I'd rather leave it for someone more familiar with 
the code, like Lars.

Ken





Merged 23508 23540. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 16 May 2016 17:55:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23540; Package emacs. (Tue, 24 May 2016 15:09:01 GMT) Full text and rfc822 format available.

Message #19 received at 23540 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 23540 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port
 fails
Date: Tue, 24 May 2016 11:09:00 -0400
On 5/15/2016 1:08 PM, Ken Brown wrote:
> On 5/15/2016 12:15 PM, Eli Zaretskii wrote:
>> Ffind_operation_coding_system includes an explicit test for the 4th
>> argument to be an integer:
>>
>>   if (!(STRINGP (target)
>>     || (EQ (operation, Qinsert_file_contents) && CONSP (target)
>>         && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
>>     || (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
>>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>     error ("Invalid argument %"pI"d of operation `%s'",
>>        XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
>>
>> This should obviously be augmented, now that the value can also be t.
>
> Presumably the documentation of open-network-stream should also be
> updated to reflect this.  I hesitate to do this myself without knowing
> for sure that t is an acceptable value for all calls to
> open-network-stream.  I'd rather leave it for someone more familiar with
> the code, like Lars.

I went ahead and installed the obvious fix, to get rid of the test 
failure.  I'm leaving the bug open because someone knowledgeable still 
needs to update the documentation of open-network-stream.

Ken





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23540; Package emacs. (Tue, 24 May 2016 15:28:02 GMT) Full text and rfc822 format available.

Message #22 received at 23540 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: 23540 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port
 fails
Date: Tue, 24 May 2016 18:27:29 +0300
> Cc: 23540 <at> debbugs.gnu.org, larsi <at> gnus.org
> From: Ken Brown <kbrown <at> cornell.edu>
> Date: Tue, 24 May 2016 11:09:00 -0400
> 
> On 5/15/2016 1:08 PM, Ken Brown wrote:
> > On 5/15/2016 12:15 PM, Eli Zaretskii wrote:
> >> Ffind_operation_coding_system includes an explicit test for the 4th
> >> argument to be an integer:
> >>
> >>   if (!(STRINGP (target)
> >>     || (EQ (operation, Qinsert_file_contents) && CONSP (target)
> >>         && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
> >>     || (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
> >>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >>     error ("Invalid argument %"pI"d of operation `%s'",
> >>        XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
> >>
> >> This should obviously be augmented, now that the value can also be t.
> >
> > Presumably the documentation of open-network-stream should also be
> > updated to reflect this.  I hesitate to do this myself without knowing
> > for sure that t is an acceptable value for all calls to
> > open-network-stream.  I'd rather leave it for someone more familiar with
> > the code, like Lars.
> 
> I went ahead and installed the obvious fix, to get rid of the test 
> failure.

Thanks.




Removed indication that bug 23540 blocks Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 10 Oct 2016 10:36:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23540; Package emacs. (Wed, 23 Oct 2019 10:33:04 GMT) Full text and rfc822 format available.

Message #27 received at 23540 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: 23540 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, 23508 <at> debbugs.gnu.org
Subject: Re: bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port
 fails
Date: Wed, 23 Oct 2019 12:32:05 +0200
Ken Brown <kbrown <at> cornell.edu> writes:

>> Presumably the documentation of open-network-stream should also be
>> updated to reflect this.  I hesitate to do this myself without knowing
>> for sure that t is an acceptable value for all calls to
>> open-network-stream.  I'd rather leave it for someone more familiar with
>> the code, like Lars.
>
> I went ahead and installed the obvious fix, to get rid of the test
> failure.  I'm leaving the bug open because someone knowledgeable still 
> needs to update the documentation of open-network-stream.

The test calls make-network-process, not open-network-stream, so
altering the documentation of the latter doesn't seem appropriate.

As for make-network-process, it's already documented there:

:service SERVICE -- SERVICE is name of the service desired, or an
integer specifying a port number to connect to.  If SERVICE is t,
a random port number is selected for the server.  A port number can
be specified as an integer string, e.g., "80", as well as an integer.

So unless I'm misreading this bug report (which is possible, it's a bit
involved) there's nothing more to do here, and I'm closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 23 Oct 2019 10:33:06 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 23508 <at> debbugs.gnu.org and mola mola <mola <at> molamola.xyz> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 23 Oct 2019 10:33:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23540; Package emacs. (Wed, 23 Oct 2019 16:32:02 GMT) Full text and rfc822 format available.

Message #34 received at 23540 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "23540 <at> debbugs.gnu.org" <23540 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>, "23508 <at> debbugs.gnu.org" <23508 <at> debbugs.gnu.org>
Subject: Re: bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port
 fails
Date: Wed, 23 Oct 2019 16:31:08 +0000
On 10/23/2019 6:32 AM, Lars Ingebrigtsen wrote:
> Ken Brown <kbrown <at> cornell.edu> writes:
> 
>>> Presumably the documentation of open-network-stream should also be
>>> updated to reflect this.  I hesitate to do this myself without knowing
>>> for sure that t is an acceptable value for all calls to
>>> open-network-stream.  I'd rather leave it for someone more familiar with
>>> the code, like Lars.
>>
>> I went ahead and installed the obvious fix, to get rid of the test
>> failure.  I'm leaving the bug open because someone knowledgeable still
>> needs to update the documentation of open-network-stream.
> 
> The test calls make-network-process, not open-network-stream, so
> altering the documentation of the latter doesn't seem appropriate.

It's appropriate because the documentation is wrong.  The documentation of 
open-network-stream doesn't say that the fourth argument can be t.

Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23540; Package emacs. (Thu, 24 Oct 2019 11:49:03 GMT) Full text and rfc822 format available.

Message #37 received at 23540 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: "23540 <at> debbugs.gnu.org" <23540 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>, "23508 <at> debbugs.gnu.org" <23508 <at> debbugs.gnu.org>
Subject: Re: bug#23540: 25.1.50; make-ipv4-tcp-server-with-unspecified-port
 fails
Date: Thu, 24 Oct 2019 13:48:03 +0200
Ken Brown <kbrown <at> cornell.edu> writes:

>>>> Presumably the documentation of open-network-stream should also be
>>>> updated to reflect this.  I hesitate to do this myself without knowing
>>>> for sure that t is an acceptable value for all calls to
>>>> open-network-stream.  I'd rather leave it for someone more familiar with
>>>> the code, like Lars.
>>>
>>> I went ahead and installed the obvious fix, to get rid of the test
>>> failure.  I'm leaving the bug open because someone knowledgeable still
>>> needs to update the documentation of open-network-stream.
>> 
>> The test calls make-network-process, not open-network-stream, so
>> altering the documentation of the latter doesn't seem appropriate.
>
> It's appropriate because the documentation is wrong.  The documentation of 
> open-network-stream doesn't say that the fourth argument can be t.

open-network-stream is for opening a client connection.  The t value for
service only makes sense for servers, so mentioning that value in
the open-network-stream doc string seems odd.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 21 Nov 2019 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 263 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.