Erlang/OTP Forums

Author Message

<  Erlang patches mailing list  ~  Bad format string in erts/emulator/sys/common/erl_check_io.c

Guest
Posted: Wed Feb 20, 2008 11:21 am Reply with quote
Guest
Thanks for the patch! It will be included in R12B-2.

BR,
Rickard Green, Erlang/OTP, Ericsson AB.

Matthew Dempsky wrote:
> In large_fd_error_common, erts_dsprintf is called with two %d
> directives but only one integer argument.
>
> --- erl_check_io.c.orig 2008-02-19 23:50:30.000000000 -0800
> +++ erl_check_io.c 2008-02-19 23:51:24.000000000 -0800
> @@ -741,11 +741,11 @@
>
> #ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
> static void
> -large_fd_error_common(erts_dsprintf_buf_t *dsbufp)
> +large_fd_error_common(erts_dsprintf_buf_t *dsbufp, ErtsSysFdType fd)
> {
> erts_dsprintf(dsbufp,
> "fd=%d is larger than the largest allowed fd=%d\n",
> - max_fds - 1);
> + (int) fd, max_fds - 1);
> }
>
> static void
> @@ -754,7 +754,7 @@
> erts_dsprintf_buf_t *dsbufp = erts_create_logger_dsbuf();
> print_select_op(dsbufp, ix, fd, mode, on);
> erts_dsprintf(dsbufp, "failed: ");
> - large_fd_error_common(dsbufp);
> + large_fd_error_common(dsbufp, fd);
> erts_send_error_to_logger_nogl(dsbufp);
> }
> #endif
> @@ -796,7 +796,7 @@
> erts_dsprintf_buf_t *dsbufp = erts_create_logger_dsbuf();
> print_event_op(dsbufp, ix, fd, event_data);
> erts_dsprintf(dsbufp, "failed: ");
> - large_fd_error_common(dsbufp);
> + large_fd_error_common(dsbufp, fd);
> erts_send_error_to_logger_nogl(dsbufp);
> }
> #endif
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-patches
>
_______________________________________________
erlang-patches mailing list
erlang-patches@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-patches
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum