Project

General

Profile

This project is closed and read-only.

Actions

Backport #5325

closed

Bug in win32.c CreateChild

Backport #5325: Bug in win32.c CreateChild

Added by jfrench (James French) about 15 years ago. Updated over 10 years ago.

Status:
Rejected
[ruby-core:39550]

Description

Hi,

Revision 31811 by yugui (http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=31811) which was merged from the trunk contains a bug. It should be lstrlen instead of lstrlenW as its a char* not a wchar_t*. This has caused us a lot of problems with spawn failing spuriously.

This should really be corrected on the 1.9.2 branch (it looks like the code has moved on on the trunk and its not an issue).

Given that its a one character change and I'm not set up for submitting patches would someone be able to fix this for me?

As a side note, compiling with warnings as errors would have caught this....

When is the next 1.9.2 patch release due?

Cheers,
James

Updated by usa (Usaku NAKAMURA) about 15 years ago Actions #1 [ruby-core:39554]

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to yugui (Yuki Sonoda)
  • Target version set to 1.9.2

this is backport bug.

Index: win32/win32.c

--- win32/win32.c (revision 33270)
+++ win32/win32.c (working copy)
@@ -1040,7 +1040,7 @@ CreateChild(const char *cmd, const char

 dwCreationFlags = (NORMAL_PRIORITY_CLASS);
  • if (lstrlenW(cmd) > 32767) {
  • if (strlen(cmd) > 32767) {
    child->pid = 0; /* release the slot */
    errno = E2BIG;
    return NULL;

Updated by marcandre (Marc-Andre Lafortune) over 14 years ago Actions #2

  • Status changed from Assigned to Closed

Duplicate of #5325

Updated by marcandre (Marc-Andre Lafortune) over 14 years ago Actions #3 [ruby-core:43102]

  • Status changed from Closed to Open
  • Target version changed from 1.9.2 to 2.0.0

I didn't realize redmine would close all duplicates. Sorry for the noise.

Updated by shyouhei (Shyouhei Urabe) over 14 years ago Actions #4

  • Status changed from Open to Assigned

Updated by mame (Yusuke Endoh) over 14 years ago Actions #5

  • Tracker changed from Bug to Backport
  • Project changed from Ruby to 12
  • Category changed from core to core
  • Target version deleted (2.0.0)

Updated by naruse (Yui NARUSE) over 10 years ago Actions #6

  • Status changed from Assigned to Rejected
Actions

Also available in: PDF Atom