[#10193] String.ord — David Flanagan <david@...>

Hi,

41 messages 2007/02/05
[#10197] Re: String.ord — Yukihiro Matsumoto <matz@...> 2007/02/06

Hi,

[#10198] Re: String.ord — David Flanagan <david@...> 2007/02/06

Yukihiro Matsumoto wrote:

[#10199] Re: String.ord — Daniel Berger <djberg96@...> 2007/02/06

David Flanagan wrote:

[#10200] Re: String.ord — David Flanagan <david@...> 2007/02/06

Daniel Berger wrote:

[#10208] Re: String.ord — "Nikolai Weibull" <now@...> 2007/02/06

On 2/6/07, David Flanagan <david@davidflanagan.com> wrote:

[#10213] Re: String.ord — David Flanagan <david@...> 2007/02/06

Nikolai Weibull wrote:

[#10215] Re: String.ord — "Nikolai Weibull" <now@...> 2007/02/06

On 2/6/07, David Flanagan <david@davidflanagan.com> wrote:

[#10216] Re: String.ord — David Flanagan <david@...> 2007/02/07

Nikolai Weibull wrote:

[#10288] Socket library should support abstract unix sockets — <noreply@...>

Bugs item #8597, was opened at 2007-02-13 16:10

12 messages 2007/02/13

[#10321] File.basename fails on Windows root paths — <noreply@...>

Bugs item #8676, was opened at 2007-02-15 10:09

11 messages 2007/02/15

[#10323] Trouble with xmlrpc — James Edward Gray II <james@...>

Some of the Ruby code used by TextMate makes use of xmlrpc/

31 messages 2007/02/15
[#10324] Re: Trouble with xmlrpc — "Berger, Daniel" <Daniel.Berger@...> 2007/02/15

> -----Original Message-----

[#10326] Re: Trouble with xmlrpc — James Edward Gray II <james@...> 2007/02/15

On Feb 15, 2007, at 1:29 PM, Berger, Daniel wrote:

[#10342] Re: Trouble with xmlrpc — James Edward Gray II <james@...> 2007/02/16

While I am complaining about xmlrpc, we have another issue. It's

[#10343] Re: Trouble with xmlrpc — Alex Young <alex@...> 2007/02/16

James Edward Gray II wrote:

[#10344] Re: Trouble with xmlrpc — James Edward Gray II <james@...> 2007/02/16

On Feb 16, 2007, at 12:08 PM, Alex Young wrote:

Re: Segmentation fault: Ruby 1.8.5 Under VC++ express 2005

From: "U.Nakamura" <usa@...>
Date: 2007-02-15 10:24:29 UTC
List: ruby-core #10318
Hello,

In message "Re: Segmentation fault: Ruby 1.8.5 Under VC++ express 2005"
    on Feb.15,2007 19:23:01, <usa@garbagecollect.jp> wrote:
| Suketa-san, could you test attached code with VC++8 and tell
| me the result?

Sorry, I forgot to attach the test code...


Regards,
-- 
U.Nakamura <usa@garbagecollect.jp>

Attachments (1)

test.c (2.15 KB, text/x-csrc)
#include <windows.h>
#include <stdio.h>
#include <memory.h>
#ifndef MAXPATHLEN
# define MAXPATHLEN 1024
#endif

typedef struct	{
    long osfhnd;    /* underlying OS file HANDLE */
    char osfile;    /* attributes of file (e.g., open in text mode?) */
    char pipech;    /* one char buffer for handles opened on pipes */
    int lockinitflag;
    CRITICAL_SECTION lock;
#if _MSC_VER >= 1400
    char textmode;
    char pipech2[2];
#endif
}	ioinfo;

#if !defined _CRTIMP || defined __MINGW32__
#undef _CRTIMP
#define _CRTIMP __declspec(dllimport)
#endif

EXTERN_C _CRTIMP ioinfo * __pioinfo[];
static size_t pioinfo_extra = 0;

#define IOINFO_L2E			5
#define IOINFO_ARRAY_ELTS	(1 << IOINFO_L2E)
#define _pioinfo(i)	((ioinfo*)((char*)(__pioinfo[i >> IOINFO_L2E]) + (i & (IOINFO_ARRAY_ELTS - 1)) * (sizeof(ioinfo) + pioinfo_extra)))
#define _osfhnd(i)  (_pioinfo(i)->osfhnd)
#define _osfile(i)  (_pioinfo(i)->osfile)

main()
{
    char libpath[MAXPATHLEN+1];
    HMODULE msvcrt = NULL;
    MEMORY_BASIC_INFORMATION m;
    DWORD dummy;
    DWORD size;
    void *buf;
    VS_FIXEDFILEINFO *pffi;
    int major, minor, teeny, build;
    int i;
    int fd;

    memset(&m, 0, sizeof(m));
    if (VirtualQuery(stdin, &m, sizeof(m)) && m.State == MEM_COMMIT)
	msvcrt = (HMODULE)m.AllocationBase;
    GetModuleFileName(msvcrt, libpath, sizeof(libpath));

    size = GetFileVersionInfoSize(libpath, &dummy);
    buf = malloc(size);
    GetFileVersionInfo(libpath, 0, size, buf);
    VerQueryValue(buf, "\\", &pffi, &dummy);
    major = HIWORD(pffi->dwFileVersionMS);
    minor = LOWORD(pffi->dwFileVersionMS);
    teeny = HIWORD(pffi->dwFileVersionLS);
    build = LOWORD(pffi->dwFileVersionLS);
    free(buf);

    printf("MSVCRT version : %d.%d.%d.%d\n", major, minor, teeny, build);

    if (major == 8 && minor == 0 && (teeny > 50727 || (teeny == 50727 && build >= 762))) {
	pioinfo_extra = 16;
    }
    fd = open("NUL", 0);
    printf("dummy test fd: %d\n", fd);
    for (i = 0; i < 10; i++) {
	printf("fd:%d adrs:%p handle:%p flag:%02x\n",
	       i, _pioinfo(i), _osfhnd(i), (unsigned char)_osfile(i));
    }
    close(fd);
}

In This Thread