5 September 2009 0 Comments

Joining Halo Team

After spending 4 years in the C# compiler team, i have decided its time for me to try something new.

3 September 2009 0 Comments

WinDBG Tutorial – Part 2

Items covered   –           Stack overflow –           Stack trace (k) –           Frame inspection (.frame n) Code used   For this exercise, we will work with the following test program (Win32 C++ console project): #include “stdafx.h”     int pow( int , int );   int _tmain( int argc, _TCHAR* argv[]) {       int a = 2;       int p = 9;       int c = 0;             printf( “a=” );       scanf( “%d” ,&a);       printf( “p=” );       scanf( “%d” ,&p);       c = pow(a,p);       printf( “C=%dn” ,c);       return 0; }   int pow( int a, int p){       if (a > 2*p)             return a-p;       return pow(a*a, p + 1); } What the program does is: read two variables, a and p and afterwards call a rather unusual method named “pow”, which seems to be a finite recursion, ending when the value of the variable a is more than twice the value of variable p. The recursion seems correct, as variable a is squared every iteration whereas p is only incremented. Let’s see what the trouble actually is.

3 September 2009 0 Comments

WinDBG tutorial – Introduction

Learning Windows Debugging is a rather tedious job not necessarily due to the lack of documentation, but rather due to the lack of an “Idiots’ guide to” WinDBG. The following series of tutorials have as target the average noob in Windows Debugging.

16 August 2009 0 Comments

Object Calisthenics: Rule 1: Use one level of indentation per method

First of all a method with a lot of different indentation is harder to understand than a method with less indentation. I also think that each level of indentation typically means you’re doing another thing.

24 July 2009 0 Comments

Building VS deployment project(MSI) with team build

You might have a requirement where you need to create a MSI for your project and distribute to the customers.

23 July 2009 0 Comments

Интервью с Саймоном Пейтоном-Джонсом (Simon Peyton-Jones), одним из создателей языка Haskell

Последняя неделя была полна интересных событий – в МГУ начала свою работу летняя школа по высокопроизводительным и параллельным вычислениям , на которую съехался действительно звёздный состав лекторов.

14 July 2009 0 Comments

Bling: a WPF Framework/Declarative Strongly-Typed DSL for Quick Expressive C# WPF Apps

Several weeks ago I met with Sean McDirmid from the Microsoft’s Research and Prototyping facility in Beijing to chat about IDE design and his recent projects. Sean is a well-known researcher with broad interests in languages, compilers, and, recently, WPF and graphics.

26 June 2009 0 Comments

Examples of linking in MSMPI library.

MSMPI is Microsoft’s implementation of MPI (Message passing interface) library.  I’ve explained it a few times before.  MSMPI Explained , MSMPI SDK patch . Many people have asked me for examples that they can understand and relate to how MPI is used on Unix.  Here’s the information you’ve been looking for! Compilers supported:   MingW’s GCC, microsoft CL, PGI, Intel…. but not GCC under cygwin or SUA

25 June 2009 0 Comments

Oslo Repository in May CTP

May CTP was an exciting milestone for Oslo Repository. We successfully integrated Repository with the M tool chain.

25 June 2009 0 Comments

Why Can’t Extension methods on Value Type be curried

This is a followup to an post Extension Methods and Curried delegates . I have been recently asked if why Error CS1113: “Extension methods ‘ Name ‘ defined on value type ‘ typename ‘ cannot be used to create delegates” was added and what does it mean

20 June 2009 1 Comment

Why AfxGetThread() returns NULL in AfxWinMain()?

Recently I worked with one of my colleague on an interesting scenario in which the MFC application was crashing on startup. The next step was to run the application under WinDbg. After running the application under WinDbg we saw that we are actually access violating an address which was indeed a NULL pointer

18 June 2009 0 Comments

Enhanced Security with SEHOP

Windows Vista SP1 introduced an interesting new memory protection known as SEHOP, which works with other memory protection techniques (like  DEP/NX , ASLR, etc) to help prevent exploitation of a specific type of memory-related vulnerability known as SEH-overwrite .