Bounds error in LockMethodInit().

From: Kurt Roeckx <Q(at)ping(dot)be>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Bounds error in LockMethodInit().
Date: 2003-08-15 18:46:18
Message-ID: 20030815184618.GA10572@ping.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In lmgr.c you have a static LOCKMASK LockConflicts[] with 9
elements in it.

You call LockMethodTableInit() with that pointer, and
MAX_LOCKMODES - 1 (10 - 1 = 9)

That calls LockMethodInit with the same arguments, but it does
numModes++.

So you basicly have a for loop that looks like:

for (i = 0; i < 10; i++, conflictsP++)

The last item you try to copy is conflictsP is not within the
the LockConflicts array anymore.

I have no idea what that numModes++ line is doing there.

Kurt

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-08-15 18:49:41 Re: [GENERAL] 7.4Beta
Previous Message Tom Lane 2003-08-15 18:40:42 Re: Copyright (C) 1996-2002